Contains the classes representing events occurring in the replication stream.
This is the abstract base class for binary log events.
Definition: log_event.h:538
DB partitioned submode For significance of each method check definition of Mts_submode.
Definition: rpl_mta_submode.h:106
Mts_submode_database()
Definition: rpl_mta_submode.h:108
void detach_temp_tables(THD *thd, const Relay_log_info *rli, Query_log_event *ev) override
Logic to detach the temporary tables from the worker threads upon event execution.
Definition: rpl_mta_submode.cc:276
bool unfold_transaction_payload_event(mysql::binlog::event::Format_description_event &fde, Transaction_payload_log_event &tple, std::vector< Log_event * > &events)
void attach_temp_tables(THD *thd, const Relay_log_info *rli, Query_log_event *ev) override
Logic to attach temporary tables.
Definition: rpl_mta_submode.cc:78
~Mts_submode_database() override=default
int wait_for_workers_to_finish(Relay_log_info *rli, Slave_worker *ignore=nullptr) override
Function is called by Coordinator when it identified an event requiring sequential execution.
Definition: rpl_mta_submode.cc:120
Slave_worker * get_least_occupied_worker(Relay_log_info *, Slave_worker_array *ws, Log_event *) override
Logic to get least occupied worker when the sql mts_submode= database.
Definition: rpl_mta_submode.cc:350
bool set_multi_threaded_applier_context(const Relay_log_info &rli, Log_event &ev) override
Sets additional context before the event is set to execute.
Definition: rpl_mta_submode.cc:190
int schedule_next_event(Relay_log_info *rli, Log_event *ev) override
Does necessary arrangement before scheduling next event.
Definition: rpl_mta_submode.cc:70
Parallelization using Master parallelization information For significance of each method check defini...
Definition: rpl_mta_submode.h:133
Slave_worker * get_free_worker(Relay_log_info *rli)
Protected method to fetch a worker having no events assigned.
Definition: rpl_mta_submode.cc:973
Slave_worker * get_least_occupied_worker(Relay_log_info *rli, Slave_worker_array *ws, Log_event *ev) override
Logic to get least occupied worker when the sql mts_submode= master_parallel.
Definition: rpl_mta_submode.cc:871
ulong last_lwm_index
Definition: rpl_mta_submode.h:141
bool first_event
Definition: rpl_mta_submode.h:135
longlong sequence_number
Definition: rpl_mta_submode.h:143
std::atomic< longlong > last_lwm_timestamp
Definition: rpl_mta_submode.h:139
void indicate_start_of_new_file() override
Sets a flag to indicate that we are starting a new binlog file, therefore we need to skip the check f...
Definition: rpl_mta_submode.h:185
bool wait_for_last_committed_trx(Relay_log_info *rli, longlong last_committed_arg)
The method implements logical timestamp conflict detection and resolution through waiting by the call...
Definition: rpl_mta_submode.cc:519
bool is_error
Definition: rpl_mta_submode.h:147
~Mts_submode_logical_clock() override=default
uint jobs_done
Definition: rpl_mta_submode.h:146
longlong last_committed
Definition: rpl_mta_submode.h:142
static const ulong INDEX_UNDEF
Definition: rpl_mta_submode.h:163
int schedule_next_event(Relay_log_info *rli, Log_event *ev) override
Does necessary arrangement before scheduling next event.
Definition: rpl_mta_submode.cc:577
static bool clock_leq(longlong a, longlong b)
Definition: rpl_mta_submode.h:204
longlong estimate_lwm_timestamp()
Definition: rpl_mta_submode.h:214
std::atomic< longlong > min_waited_timestamp
Definition: rpl_mta_submode.h:152
bool force_new_group
Definition: rpl_mta_submode.h:135
uint delegated_jobs
Definition: rpl_mta_submode.h:137
void withdraw_delegated_job()
Withdraw the delegated_job increased by the group.
Definition: rpl_mta_submode.h:189
void attach_temp_tables(THD *thd, const Relay_log_info *rli, Query_log_event *ev) override
Logic to attach the temporary tables from the worker threads upon event execution.
Definition: rpl_mta_submode.cc:792
void detach_temp_tables(THD *thd, const Relay_log_info *rli, Query_log_event *) override
Logic to detach the temporary tables from the worker threads upon event execution.
Definition: rpl_mta_submode.cc:845
Mts_submode_logical_clock()
Definition: rpl_mta_submode.cc:380
std::pair< uint, my_thread_id > get_server_and_thread_id(TABLE *table)
Protected method to fetch the server_id and pseudo_thread_id from a temporary table.
Definition: rpl_mta_submode.cc:1038
longlong get_lwm_timestamp(Relay_log_info *rli, bool need_lock)
The method finds the minimum logical timestamp (low-water-mark) of committed transactions.
Definition: rpl_mta_submode.cc:437
bool is_new_group
Definition: rpl_mta_submode.h:136
void start_new_group()
Definition: rpl_mta_submode.h:180
int wait_for_workers_to_finish(Relay_log_info *rli, Slave_worker *ignore=nullptr) override
Waits for slave workers to finish off the pending tasks before returning.
Definition: rpl_mta_submode.cc:991
Definition: rpl_mta_submode.h:55
virtual ~Mts_submode()=default
virtual bool set_multi_threaded_applier_context(const Relay_log_info &, Log_event &)
Sets additional context before the event is set to execute.
Definition: rpl_mta_submode.h:94
enum_mts_parallel_type type
Definition: rpl_mta_submode.h:59
virtual void attach_temp_tables(THD *thd, const Relay_log_info *rli, Query_log_event *ev)=0
enum_mts_parallel_type get_type()
Definition: rpl_mta_submode.h:63
virtual void indicate_start_of_new_file()
indicates the start of new file, which may e.g.
Definition: rpl_mta_submode.h:89
virtual int schedule_next_event(Relay_log_info *rli, Log_event *ev)=0
virtual void detach_temp_tables(THD *thd, const Relay_log_info *rli, Query_log_event *ev)=0
virtual int wait_for_workers_to_finish(Relay_log_info *rli, Slave_worker *ignore=nullptr)=0
virtual Slave_worker * get_least_occupied_worker(Relay_log_info *rli, Slave_worker_array *ws, Log_event *ev)=0
A Query event is written to the binary log whenever the database is modified on the master,...
Definition: log_event.h:1296
Definition: rpl_rli.h:206
Definition: rpl_rli_pdb.h:501
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Definition: log_event.h:3879
const int64_t SEQ_UNINIT
Uninitialized timestamp value (for either last committed or sequence number).
Definition: binlog_event.h:150
Binary log event definitions.
Some integer typedefs for easier portability.
long long int longlong
Definition: my_inttypes.h:55
static bool ignore
Definition: mysqlimport.cc:70
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
Prealloced_array< Slave_worker *, 4 > Slave_worker_array
Definition: rpl_mta_submode.h:43
enum_mts_parallel_type
Definition: rpl_mta_submode.h:47
@ MTS_PARALLEL_TYPE_LOGICAL_CLOCK
Definition: rpl_mta_submode.h:51
@ MTS_PARALLEL_TYPE_DB_NAME
Definition: rpl_mta_submode.h:49