24#ifndef DEFINED_RPL_REPLICA_UNTIL_OPTIONS_H
25#define DEFINED_RPL_REPLICA_UNTIL_OPTIONS_H
273 int init(
const char *gtid_set_str);
380 int init(
const char *view_id);
Represents a set of GTIDs.
Definition: rpl_gtid.h:1556
This is the abstract base class for binary log events.
Definition: log_event.h:538
Definition: rpl_rli.h:203
It implements the logic of UNTIL SQL_AFTER_GTIDS.
Definition: rpl_replica_until_options.h:309
void last_transaction_executed_message()
Print message to the error log for the last message.
Definition: rpl_replica_until_options.cc:236
bool check_all_transactions_read_from_relay_log() override
Definition: rpl_replica_until_options.cc:346
bool check_at_start_slave() override
Definition: rpl_replica_until_options.cc:254
bool check_before_dispatching_event(const Log_event *ev) override
Definition: rpl_replica_until_options.cc:264
~Until_after_gtids() override
Definition: rpl_replica_until_options.cc:234
bool check_after_dispatching_event() override
Definition: rpl_replica_until_options.cc:311
bool m_last_transaction_in_execution
Definition: rpl_replica_until_options.h:356
bool check_all_transactions_executed()
Checks if all the customer specified transactions have been executed or not.
Definition: rpl_replica_until_options.cc:244
Until_after_gtids(Relay_log_info *rli)
Definition: rpl_replica_until_options.h:311
bool wait_for_gtid_set()
If last transaction has ben completely received wait for the worker thread to finish executing the tr...
Definition: rpl_replica_until_options.cc:323
std::unique_ptr< Gtid_set > m_gtids_known_to_channel
Definition: rpl_replica_until_options.h:351
It implements the logic of UNTIL SQL_BEFORE_GTIDS.
Definition: rpl_replica_until_options.h:293
Until_before_gtids(Relay_log_info *rli)
Definition: rpl_replica_until_options.h:295
bool check_at_start_slave() override
Definition: rpl_replica_until_options.cc:190
bool check_before_dispatching_event(const Log_event *ev) override
Definition: rpl_replica_until_options.cc:207
bool check_all_transactions_read_from_relay_log() override
Definition: rpl_replica_until_options.cc:230
bool check_after_dispatching_event() override
Definition: rpl_replica_until_options.cc:228
It is an abstract class for UNTIL SQL_BEFORE_GTIDS and SQL_AFTER_GTIDS.
Definition: rpl_replica_until_options.h:260
int init(const char *gtid_set_str)
Initialize the until gtids when starting the slave.
Definition: rpl_replica_until_options.cc:179
Gtid_set m_gtids
Stores the gtids of START REPLICA UNTIL SQL_*_GTIDS.
Definition: rpl_replica_until_options.h:282
~Until_gtids() override=default
Until_gtids(Relay_log_info *rli)
Definition: rpl_replica_until_options.h:284
It is for UNTIL SOURCE_LOG_FILE and SOURCE_LOG_POS.
Definition: rpl_replica_until_options.h:219
bool check_at_start_slave() override
Definition: rpl_replica_until_options.cc:115
bool check_before_dispatching_event(const Log_event *ev) override
Definition: rpl_replica_until_options.cc:124
bool check_all_transactions_read_from_relay_log() override
Definition: rpl_replica_until_options.cc:157
Until_master_position(Relay_log_info *rli)
Definition: rpl_replica_until_options.h:221
bool check_after_dispatching_event() override
Definition: rpl_replica_until_options.cc:150
char m_current_log_name[FN_REFLEN]
Definition: rpl_replica_until_options.h:229
my_off_t m_current_log_pos
Definition: rpl_replica_until_options.h:230
It implements the logic of UNTIL SQL_AFTER_MTS_GAP.
Definition: rpl_replica_until_options.h:410
void init()
Initialize it when starting the slave.
Definition: rpl_replica_until_options.cc:393
bool check_before_dispatching_event(const Log_event *ev) override
Definition: rpl_replica_until_options.cc:399
bool check_at_start_slave() override
Definition: rpl_replica_until_options.cc:397
bool check_after_dispatching_event() override
Definition: rpl_replica_until_options.cc:408
Until_mts_gap(Relay_log_info *rli)
Definition: rpl_replica_until_options.h:412
bool check_all_transactions_read_from_relay_log() override
Definition: rpl_replica_until_options.cc:410
This is the abstract base class for slave start until options.
Definition: rpl_replica_until_options.h:56
bool is_satisfied_after_dispatching_event()
check if the until option is satisfied after applied or dispatched a event.
Definition: rpl_replica_until_options.h:97
Until_option(Relay_log_info *rli)
Definition: rpl_replica_until_options.h:119
virtual bool check_before_dispatching_event(const Log_event *ev)=0
Relay_log_info * m_rli
Definition: rpl_replica_until_options.h:117
bool is_satisfied_before_dispatching_event(const Log_event *ev)
check if the until option is satisfied before applying or dispatching a event.
Definition: rpl_replica_until_options.h:83
virtual bool check_at_start_slave()=0
virtual bool check_all_transactions_read_from_relay_log()=0
bool is_satisfied_at_start_slave()
Check if the until option is already satisfied at coordinator starting.
Definition: rpl_replica_until_options.h:67
virtual bool check_after_dispatching_event()=0
bool is_satisfied_all_transactions_read_from_relay_log()
check if the until option is waiting for more transactions to be read from the relay log.
Definition: rpl_replica_until_options.h:111
virtual ~Until_option()=default
It is an abstract class for until master position and until relay log position.
Definition: rpl_replica_until_options.h:145
my_off_t get_until_log_pos()
Definition: rpl_replica_until_options.h:172
int init(const char *log_name, my_off_t log_pos)
Initialize the until position when starting the slave.
Definition: rpl_replica_until_options.cc:43
~Until_position() override=default
const char * get_until_log_name()
Definition: rpl_replica_until_options.h:171
Until_position(Relay_log_info *rli)
Definition: rpl_replica_until_options.h:186
@ LOG_NAMES_CMP_LESS
Definition: rpl_replica_until_options.h:181
@ LOG_NAMES_CMP_GREATER
Definition: rpl_replica_until_options.h:183
@ LOG_NAMES_CMP_EQUAL
Definition: rpl_replica_until_options.h:182
@ LOG_NAMES_CMP_UNKNOWN
Definition: rpl_replica_until_options.h:180
enum Until_position::@156 m_log_names_cmp_result
Log name is compared only once for each master log or relay log.
ulong m_until_log_name_extension
Definition: rpl_replica_until_options.h:211
bool check_position(const char *log_name, my_off_t log_pos)
Check if until position is satisfied.
Definition: rpl_replica_until_options.cc:66
void notify_log_name_change()
Coordinator calls this function to notify that master log switch or relay log switch.
Definition: rpl_replica_until_options.h:165
char m_until_log_name[FN_REFLEN]
Definition: rpl_replica_until_options.h:203
ulonglong m_until_log_pos
Definition: rpl_replica_until_options.h:204
It is for UNTIL relay_log_file and relay_log_pos.
Definition: rpl_replica_until_options.h:243
bool check_before_dispatching_event(const Log_event *ev) override
Definition: rpl_replica_until_options.cc:166
bool check_at_start_slave() override
Definition: rpl_replica_until_options.cc:161
bool check_all_transactions_read_from_relay_log() override
Definition: rpl_replica_until_options.cc:175
Until_relay_position(Relay_log_info *rli)
Definition: rpl_replica_until_options.h:245
bool check_after_dispatching_event() override
Definition: rpl_replica_until_options.cc:170
It implements the logic for UNTIL VIEW_ID.
Definition: rpl_replica_until_options.h:364
bool until_view_id_found
Definition: rpl_replica_until_options.h:390
std::string m_view_id
Definition: rpl_replica_until_options.h:383
bool check_before_dispatching_event(const Log_event *ev) override
Definition: rpl_replica_until_options.cc:365
bool check_all_transactions_read_from_relay_log() override
Definition: rpl_replica_until_options.cc:389
Until_view_id(Relay_log_info *rli)
Definition: rpl_replica_until_options.h:366
int init(const char *view_id)
Initialize the view_id when starting the slave.
Definition: rpl_replica_until_options.cc:351
bool check_at_start_slave() override
Definition: rpl_replica_until_options.cc:363
bool until_view_id_commit_found
Definition: rpl_replica_until_options.h:397
bool check_after_dispatching_event() override
Definition: rpl_replica_until_options.cc:385
#define DBUG_TRACE
Definition: my_dbug.h:146
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
ulonglong my_off_t
Definition: my_inttypes.h:72
Common #defines and includes for file and socket I/O.
#define FN_REFLEN
Definition: my_io.h:83
Tsid_map * global_tsid_map
Definition: mysqld.cc:1825