MySQL 8.3.0
Source Code Documentation
Until_after_gtids Class Reference

It implements the logic of UNTIL SQL_AFTER_GTIDS. More...

#include <rpl_replica_until_options.h>

Inheritance diagram for Until_after_gtids:
[legend]

Public Member Functions

 Until_after_gtids (Relay_log_info *rli)
 
 ~Until_after_gtids () override
 
- Public Member Functions inherited from Until_gtids
 ~Until_gtids () override=default
 
int init (const char *gtid_set_str)
 Initialize the until gtids when starting the slave. More...
 
- Public Member Functions inherited from Until_option
virtual ~Until_option ()=default
 
bool is_satisfied_at_start_slave ()
 Check if the until option is already satisfied at coordinator starting. More...
 
bool is_satisfied_before_dispatching_event (const Log_event *ev)
 check if the until option is satisfied before applying or dispatching a event. More...
 
bool is_satisfied_after_dispatching_event ()
 check if the until option is satisfied after applied or dispatched a event. More...
 
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. More...
 

Private Member Functions

bool check_at_start_slave () override
 
bool check_before_dispatching_event (const Log_event *ev) override
 
bool check_after_dispatching_event () override
 
bool check_all_transactions_read_from_relay_log () override
 
bool check_all_transactions_executed ()
 Checks if all the customer specified transactions have been executed or not. More...
 
bool wait_for_gtid_set ()
 If last transaction has ben completely received wait for the worker thread to finish executing the transactions. More...
 
void last_transaction_executed_message ()
 Print message to the error log for the last message. More...
 

Private Attributes

std::unique_ptr< Gtid_setm_gtids_known_to_channel {nullptr}
 
bool m_last_transaction_in_execution {false}
 

Additional Inherited Members

- Protected Member Functions inherited from Until_gtids
 Until_gtids (Relay_log_info *rli)
 
- Protected Member Functions inherited from Until_option
 Until_option (Relay_log_info *rli)
 
- Protected Attributes inherited from Until_gtids
Gtid_set m_gtids
 Stores the gtids of START SLAVE UNTIL SQL_*_GTIDS. More...
 
- Protected Attributes inherited from Until_option
Relay_log_infom_rli
 

Detailed Description

It implements the logic of UNTIL SQL_AFTER_GTIDS.

Constructor & Destructor Documentation

◆ Until_after_gtids()

Until_after_gtids::Until_after_gtids ( Relay_log_info rli)
inline

◆ ~Until_after_gtids()

Until_after_gtids::~Until_after_gtids ( )
override

Member Function Documentation

◆ check_after_dispatching_event()

bool Until_after_gtids::check_after_dispatching_event ( )
overrideprivatevirtual

Implements Until_option.

◆ check_all_transactions_executed()

bool Until_after_gtids::check_all_transactions_executed ( )
private

Checks if all the customer specified transactions have been executed or not.

Returns
bool
Return values
trueall customer specified transactions have been executed
falsecustomer specified all transactions have not been executed yet

◆ check_all_transactions_read_from_relay_log()

bool Until_after_gtids::check_all_transactions_read_from_relay_log ( )
overrideprivatevirtual

Implements Until_option.

◆ check_at_start_slave()

bool Until_after_gtids::check_at_start_slave ( )
overrideprivatevirtual

Implements Until_option.

◆ check_before_dispatching_event()

bool Until_after_gtids::check_before_dispatching_event ( const Log_event ev)
overrideprivatevirtual

Implements Until_option.

◆ last_transaction_executed_message()

void Until_after_gtids::last_transaction_executed_message ( )
private

Print message to the error log for the last message.

Caller of the function should hold a read or write lock on global_tsid_lock.

◆ wait_for_gtid_set()

bool Until_after_gtids::wait_for_gtid_set ( )
private

If last transaction has ben completely received wait for the worker thread to finish executing the transactions.

Returns
bool
Return values
trueerror happened in wait like worker error out, shutdown etc.
falseall specified transactions have been executed

Member Data Documentation

◆ m_gtids_known_to_channel

std::unique_ptr<Gtid_set> Until_after_gtids::m_gtids_known_to_channel {nullptr}
private

◆ m_last_transaction_in_execution

bool Until_after_gtids::m_last_transaction_in_execution {false}
private

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