MySQL 8.4.2
Source Code Documentation
|
The extension class for the master of semi-synchronous replication. More...
#include <semisync_source.h>
Public Member Functions | |
ReplSemiSyncMaster () | |
~ReplSemiSyncMaster () | |
bool | getMasterEnabled () |
void | setTraceLevel (unsigned long trace_level) |
void | set_wait_no_replica (const void *val) |
void | setWaitTimeout (unsigned long wait_timeout) |
int | initObject () |
int | enableMaster () |
int | disableMaster () |
void | add_slave () |
void | remove_slave () |
bool | is_semi_sync_slave () |
int | reportReplyPacket (uint32 server_id, const uchar *packet, ulong packet_len) |
void | reportReplyBinlog (const char *log_file_name, my_off_t end_offset) |
int | commitTrx (const char *trx_wait_binlog_name, my_off_t trx_wait_binlog_pos) |
int | reserveSyncHeader (unsigned char *header, unsigned long size) |
int | updateSyncHeader (unsigned char *packet, const char *log_file_name, my_off_t log_file_pos, uint32 server_id) |
int | writeTranxInBinlog (const char *log_file_name, my_off_t log_file_pos) |
int | readSlaveReply (NET *net, const char *event_buf) |
int | skipSlaveReply (const char *event_buf, uint32 server_id, const char *log_file_name, my_off_t log_file_pos) |
void | setExportStats () |
int | resetMaster () |
int | setWaitSlaveCount (unsigned int new_value) |
void | handleAck (int server_id, const char *log_file_name, my_off_t log_file_pos) |
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 Member Functions | |
void | lock () |
void | unlock () |
bool | is_on () |
void | set_master_enabled (bool enabled) |
int | switch_off () |
void | force_switch_on () |
int | try_switch_on (const char *log_file_name, my_off_t log_file_pos) |
Private Attributes | |
ActiveTranx * | active_tranxs_ = nullptr |
bool | init_done_ = false |
mysql_mutex_t | LOCK_binlog_ |
bool | reply_file_name_inited_ = false |
char | reply_file_name_ [FN_REFLEN] |
my_off_t | reply_file_pos_ = 0 |
bool | wait_file_name_inited_ = false |
char | wait_file_name_ [FN_REFLEN] |
my_off_t | wait_file_pos_ = 0 |
bool | commit_file_name_inited_ = false |
char | commit_file_name_ [FN_REFLEN] |
my_off_t | commit_file_pos_ = 0 |
volatile bool | master_enabled_ |
unsigned long | wait_timeout_ = 0 |
bool | state_ = false |
AckContainer | ack_container_ |
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 |
The extension class for the master of semi-synchronous replication.
ReplSemiSyncMaster::ReplSemiSyncMaster | ( | ) |
ReplSemiSyncMaster::~ReplSemiSyncMaster | ( | ) |
void ReplSemiSyncMaster::add_slave | ( | ) |
int ReplSemiSyncMaster::commitTrx | ( | const char * | trx_wait_binlog_name, |
my_off_t | trx_wait_binlog_pos | ||
) |
int ReplSemiSyncMaster::disableMaster | ( | ) |
int ReplSemiSyncMaster::enableMaster | ( | ) |
|
private |
|
inline |
|
inline |
int ReplSemiSyncMaster::initObject | ( | ) |
|
inlineprivate |
bool ReplSemiSyncMaster::is_semi_sync_slave | ( | ) |
|
private |
int ReplSemiSyncMaster::readSlaveReply | ( | NET * | net, |
const char * | event_buf | ||
) |
void ReplSemiSyncMaster::remove_slave | ( | ) |
void ReplSemiSyncMaster::reportReplyBinlog | ( | const char * | log_file_name, |
my_off_t | end_offset | ||
) |
int ReplSemiSyncMaster::reportReplyPacket | ( | uint32 | server_id, |
const uchar * | packet, | ||
ulong | packet_len | ||
) |
int ReplSemiSyncMaster::reserveSyncHeader | ( | unsigned char * | header, |
unsigned long | size | ||
) |
int ReplSemiSyncMaster::resetMaster | ( | ) |
|
inlineprivate |
void ReplSemiSyncMaster::set_wait_no_replica | ( | const void * | val | ) |
void ReplSemiSyncMaster::setExportStats | ( | ) |
|
inline |
int ReplSemiSyncMaster::setWaitSlaveCount | ( | unsigned int | new_value | ) |
|
inline |
int ReplSemiSyncMaster::skipSlaveReply | ( | const char * | event_buf, |
uint32 | server_id, | ||
const char * | log_file_name, | ||
my_off_t | log_file_pos | ||
) |
|
private |
|
private |
|
private |
int ReplSemiSyncMaster::updateSyncHeader | ( | unsigned char * | packet, |
const char * | log_file_name, | ||
my_off_t | log_file_pos, | ||
uint32 | server_id | ||
) |
int ReplSemiSyncMaster::writeTranxInBinlog | ( | const char * | log_file_name, |
my_off_t | log_file_pos | ||
) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |