1#ifndef RPL_TRX_TRACKING_INCLUDED
25#define RPL_TRX_TRACKING_INCLUDED
34#include <ankerl/unordered_dense.h>
74 assert(
offset <= new_offset);
108 int64 &sequence_number,
int64 &commit_parent);
191 int64 &sequence_number,
int64 &commit_parent);
Contains the classes representing events occurring in the replication stream.
Generate logical timestamps for MTS using COMMIT_ORDER binlog transaction dependency tracking algorit...
Definition: rpl_trx_tracking.h:96
Logical_clock get_max_committed_transaction()
Definition: rpl_trx_tracking.h:112
void rotate()
Definition: rpl_trx_tracking.cc:184
int64 step()
Definition: rpl_trx_tracking.cc:180
int64 m_last_blocking_transaction
Definition: rpl_trx_tracking.h:132
void update_max_committed(int64 sequence_number)
Definition: rpl_trx_tracking.cc:191
void get_dependency(THD *thd, bool parallelization_barrier, int64 &sequence_number, int64 &commit_parent)
Main function that gets the dependencies using the COMMIT_ORDER tracker.
Definition: rpl_trx_tracking.cc:149
Logical_clock m_max_committed_transaction
Definition: rpl_trx_tracking.h:121
Logical_clock m_transaction_counter
Definition: rpl_trx_tracking.h:124
Logical timestamp generator for logical timestamping binlog transactions.
Definition: rpl_trx_tracking.h:46
Logical_clock(const Logical_clock &other)
Definition: rpl_trx_tracking.h:60
int64 step()
Steps the absolute value of the clock (state) to return an updated value.
Definition: rpl_trx_tracking.cc:65
int64 set_if_greater(int64 new_val)
To try setting the clock forward.
Definition: rpl_trx_tracking.cc:83
void update_offset(int64 new_offset)
Definition: rpl_trx_tracking.h:73
std::atomic< int64 > state
Definition: rpl_trx_tracking.h:48
Logical_clock()
Definition: rpl_trx_tracking.cc:44
int64 offset
Definition: rpl_trx_tracking.h:56
int64 get_timestamp()
Atomically fetch the current state.
Definition: rpl_trx_tracking.cc:50
int64 get_offset()
Definition: rpl_trx_tracking.h:66
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Dependency tracker is a container singleton that dispatches between the three methods associated with...
Definition: rpl_trx_tracking.h:186
Transaction_dependency_tracker()
Definition: rpl_trx_tracking.h:188
void rotate()
Definition: rpl_trx_tracking.cc:340
Commit_order_trx_dependency_tracker m_commit_order
Definition: rpl_trx_tracking.h:204
void update_max_committed(THD *thd)
The method is to be executed right before committing time.
Definition: rpl_trx_tracking.cc:325
Writeset_trx_dependency_tracker m_writeset
Definition: rpl_trx_tracking.h:203
int64 get_max_committed_timestamp()
Definition: rpl_trx_tracking.cc:350
int64 step()
Definition: rpl_trx_tracking.cc:338
void get_dependency(THD *thd, bool parallelization_barrier, int64 &sequence_number, int64 &commit_parent)
Get the dependencies in a transaction, the main entry point for the dependency tracking work.
Definition: rpl_trx_tracking.cc:305
Writeset_trx_dependency_tracker * get_writeset()
Definition: rpl_trx_tracking.h:200
Generate logical timestamps for MTS using WRITESET binlog transaction dependency tracking algorithm.
Definition: rpl_trx_tracking.h:142
void rotate(int64 start)
Definition: rpl_trx_tracking.cc:296
void get_dependency(THD *thd, int64 &sequence_number, int64 &commit_parent)
Main function that gets the dependencies using the WRITESET tracker.
Definition: rpl_trx_tracking.cc:212
Writeset_trx_dependency_tracker(ulong max_history_size)
Definition: rpl_trx_tracking.h:144
Writeset_history m_writeset_history
Definition: rpl_trx_tracking.h:178
std::atomic< ulong > m_opt_max_history_size
Definition: rpl_trx_tracking.h:159
ankerl::unordered_dense::map< uint64, int64 > Writeset_history
Definition: rpl_trx_tracking.h:177
int64 m_writeset_history_start
Definition: rpl_trx_tracking.h:171
const int64_t SEQ_UNINIT
Uninitialized timestamp value (for either last committed or sequence number).
Definition: binlog_event.h:150
static void start(mysql_harness::PluginFuncEnv *env)
Definition: http_auth_backend_plugin.cc:180
Some integer typedefs for easier portability.
int64_t int64
Definition: my_inttypes.h:68
bool load(THD *, const dd::String_type &fname, dd::String_type *buf)
Read an sdi file from disk and store in a buffer.
Definition: sdi_file.cc:308