MySQL 8.0.40
Source Code Documentation
Flow_control_module Class Reference

The pipeline stats aggregator of all group members stats and flow control module. More...

#include <pipeline_stats.h>

Public Member Functions

 Flow_control_module ()
 Default constructor. More...
 
virtual ~Flow_control_module ()
 Destructor. More...
 
int handle_stats_data (const uchar *data, size_t len, const std::string &member_id)
 Handles a Pipeline_stats_message, updating the Flow_control_module_info and the delay, if needed. More...
 
void flow_control_step (Pipeline_stats_member_collector *)
 Evaluate the information received in the last flow control period and adjust the system parameters accordingly. More...
 
Pipeline_member_statsget_pipeline_stats (const std::string &member_id)
 Returns copy of individual member stats information. More...
 
int32 do_wait ()
 Compute and wait the amount of time in microseconds that must be elapsed before a new message is sent. More...
 

Static Public Attributes

static const int64 MAXTPS = INT_MAX32
 

Private Attributes

mysql_mutex_t m_flow_control_lock
 
mysql_cond_t m_flow_control_cond
 
Flow_control_module_info m_info
 
Checkable_rwlockm_flow_control_module_info_lock
 
std::atomic< int32m_holds_in_period
 
std::atomic< int64m_quota_used
 
std::atomic< int64m_quota_size
 
uint64 m_stamp
 
int seconds_to_skip
 

Detailed Description

The pipeline stats aggregator of all group members stats and flow control module.

Constructor & Destructor Documentation

◆ Flow_control_module()

Flow_control_module::Flow_control_module ( )

Default constructor.

◆ ~Flow_control_module()

Flow_control_module::~Flow_control_module ( )
virtual

Destructor.

Member Function Documentation

◆ do_wait()

int32 Flow_control_module::do_wait ( )

Compute and wait the amount of time in microseconds that must be elapsed before a new message is sent.

If there is no need to wait, the method returns immediately.

Returns
the wait time
Return values
0No wait was done
>0The wait time

◆ flow_control_step()

void Flow_control_module::flow_control_step ( Pipeline_stats_member_collector member)

Evaluate the information received in the last flow control period and adjust the system parameters accordingly.

◆ get_pipeline_stats()

Pipeline_member_stats * Flow_control_module::get_pipeline_stats ( const std::string &  member_id)

Returns copy of individual member stats information.

Note
Its caller responsibility to clean up allocated memory.
Parameters
[in]member_idGCS Type Member Id, i.e. format HOST:PORT
Returns
the reference to class Pipeline_member_stats of memberID storing network(GCS Broadcasted) received information

◆ handle_stats_data()

int Flow_control_module::handle_stats_data ( const uchar data,
size_t  len,
const std::string &  member_id 
)

Handles a Pipeline_stats_message, updating the Flow_control_module_info and the delay, if needed.

Parameters
[in]datathe packet data
[in]lenthe packet length
[in]member_idthe GCS member_id which sent the message
Returns
the operation status
Return values
0OK
!=0Error on queue

Member Data Documentation

◆ m_flow_control_cond

mysql_cond_t Flow_control_module::m_flow_control_cond
private

◆ m_flow_control_lock

mysql_mutex_t Flow_control_module::m_flow_control_lock
private

◆ m_flow_control_module_info_lock

Checkable_rwlock* Flow_control_module::m_flow_control_module_info_lock
private

◆ m_holds_in_period

std::atomic<int32> Flow_control_module::m_holds_in_period
private

◆ m_info

Flow_control_module_info Flow_control_module::m_info
private

◆ m_quota_size

std::atomic<int64> Flow_control_module::m_quota_size
private

◆ m_quota_used

std::atomic<int64> Flow_control_module::m_quota_used
private

◆ m_stamp

uint64 Flow_control_module::m_stamp
private

◆ MAXTPS

const int64 Flow_control_module::MAXTPS = INT_MAX32
static

◆ seconds_to_skip

int Flow_control_module::seconds_to_skip
private

The documentation for this class was generated from the following files: