MySQL 9.1.0
Source Code Documentation
|
Ack_receiver is responsible to control ack receive thread and maintain slave information used by ack receive thread. More...
#include <semisync_source_ack_receiver.h>
Public Member Functions | |
Ack_receiver () | |
~Ack_receiver () | |
bool | add_slave (THD *thd) |
Notify ack receiver to receive acks on the dump session. More... | |
void | remove_slave (THD *thd) |
Notify ack receiver not to receive ack on the dump session. More... | |
bool | start () |
Start ack receive thread. More... | |
void | stop () |
Stop ack receive thread. More... | |
void | run () |
The core of ack receive thread. More... | |
void | setTraceLevel (unsigned long trace_level) |
bool | init () |
Public Member Functions inherited from Trace | |
void | function_enter (const char *func_name) |
int | function_exit (const char *func_name, int exit_code) |
bool | function_exit (const char *func_name, bool exit_code) |
void | function_exit (const char *func_name) |
Trace () | |
Trace (unsigned long trace_level) | |
Private Types | |
enum | status { ST_UP , ST_DOWN , ST_STOPPING } |
Private Member Functions | |
Ack_receiver (const Ack_receiver &ack_receiver) | |
Ack_receiver & | operator= (const Ack_receiver &ack_receiver) |
void | set_stage_info (const PSI_stage_info &stage) |
void | wait_for_slave_connection () |
Private Attributes | |
uint8 | m_status |
mysql_mutex_t | m_mutex |
mysql_cond_t | m_cond |
bool | m_slaves_changed |
Slave_vector | m_slaves |
my_thread_handle | m_pid |
Additional Inherited Members | |
Public Attributes inherited from Trace | |
unsigned long | trace_level_ |
Static Public Attributes inherited from ReplSemiSyncBase | |
static const unsigned char | kSyncHeader [2] |
static const unsigned char | kPacketMagicNum = 0xef |
static const unsigned char | kPacketFlagSync = 0x01 |
Static Public Attributes inherited from Trace | |
static const unsigned long | kTraceFunction = 0x0040 |
static const unsigned long | kTraceGeneral = 0x0001 |
static const unsigned long | kTraceDetail = 0x0010 |
static const unsigned long | kTraceNetWait = 0x0020 |
Ack_receiver is responsible to control ack receive thread and maintain slave information used by ack receive thread.
There are mainly four operations on ack receive thread: start: start ack receive thread stop: stop ack receive thread add_slave: maintain a new semisync slave's information remove_slave: remove a semisync slave's information
|
private |
Ack_receiver::Ack_receiver | ( | ) |
Ack_receiver::~Ack_receiver | ( | ) |
|
private |
bool Ack_receiver::add_slave | ( | THD * | thd | ) |
Notify ack receiver to receive acks on the dump session.
It adds the given dump thread into the slave list and wakes up ack thread if it is waiting for any slave coming.
[in] | thd | THD of a dump thread. |
|
inline |
|
private |
void Ack_receiver::remove_slave | ( | THD * | thd | ) |
Notify ack receiver not to receive ack on the dump session.
it removes the given dump thread from slave list.
[in] | thd | THD of a dump thread. |
void Ack_receiver::run | ( | ) |
The core of ack receive thread.
It monitors all slaves' sockets and receives acks when they come.
|
inlineprivate |
|
inline |
bool Ack_receiver::start | ( | ) |
Start ack receive thread.
void Ack_receiver::stop | ( | ) |
Stop ack receive thread.
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |