![]()  | 
  
    MySQL 9.5.0
    
   Source Code Documentation 
   | 
 
The extension class for the source of semi-synchronous replication. More...
#include <semisync_source.h>
Public Member Functions | |
| ReplSemiSyncSource () | |
| ~ReplSemiSyncSource () | |
| bool | getSourceEnabled () | 
| void | setTraceLevel (unsigned long trace_level) | 
| void | set_wait_no_replica (const void *val) | 
| void | setWaitTimeout (unsigned long wait_timeout) | 
| int | initObject () | 
| int | enableSource () | 
| int | disableSource () | 
| void | add_replica () | 
| void | remove_replica () | 
| bool | is_semi_sync_replica () | 
| 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 | readReplicaReply (NET *net, const char *event_buf) | 
| int | skipReplicaReply (const char *event_buf, uint32 server_id, const char *log_file_name, my_off_t log_file_pos) | 
| void | setExportStats () | 
| int | resetSource () | 
| int | setWaitReplicaCount (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_source_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 | source_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 source of semi-synchronous replication.
| ReplSemiSyncSource::ReplSemiSyncSource | ( | ) | 
| ReplSemiSyncSource::~ReplSemiSyncSource | ( | ) | 
| void ReplSemiSyncSource::add_replica | ( | ) | 
| int ReplSemiSyncSource::commitTrx | ( | const char * | trx_wait_binlog_name, | 
| my_off_t | trx_wait_binlog_pos | ||
| ) | 
| int ReplSemiSyncSource::disableSource | ( | ) | 
| int ReplSemiSyncSource::enableSource | ( | ) | 
      
  | 
  private | 
      
  | 
  inline | 
      
  | 
  inline | 
| int ReplSemiSyncSource::initObject | ( | ) | 
      
  | 
  inlineprivate | 
| bool ReplSemiSyncSource::is_semi_sync_replica | ( | ) | 
      
  | 
  private | 
| int ReplSemiSyncSource::readReplicaReply | ( | NET * | net, | 
| const char * | event_buf | ||
| ) | 
| void ReplSemiSyncSource::remove_replica | ( | ) | 
| void ReplSemiSyncSource::reportReplyBinlog | ( | const char * | log_file_name, | 
| my_off_t | end_offset | ||
| ) | 
| int ReplSemiSyncSource::reportReplyPacket | ( | uint32 | server_id, | 
| const uchar * | packet, | ||
| ulong | packet_len | ||
| ) | 
| int ReplSemiSyncSource::reserveSyncHeader | ( | unsigned char * | header, | 
| unsigned long | size | ||
| ) | 
| int ReplSemiSyncSource::resetSource | ( | ) | 
      
  | 
  inlineprivate | 
| void ReplSemiSyncSource::set_wait_no_replica | ( | const void * | val | ) | 
| void ReplSemiSyncSource::setExportStats | ( | ) | 
      
  | 
  inline | 
| int ReplSemiSyncSource::setWaitReplicaCount | ( | unsigned int | new_value | ) | 
      
  | 
  inline | 
| int ReplSemiSyncSource::skipReplicaReply | ( | const char * | event_buf, | 
| uint32 | server_id, | ||
| const char * | log_file_name, | ||
| my_off_t | log_file_pos | ||
| ) | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
| int ReplSemiSyncSource::updateSyncHeader | ( | unsigned char * | packet, | 
| const char * | log_file_name, | ||
| my_off_t | log_file_pos, | ||
| uint32 | server_id | ||
| ) | 
| int ReplSemiSyncSource::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 |