1#ifndef RPL_TRX_TRACKING_INCLUDED
25#define RPL_TRX_TRACKING_INCLUDED
73 assert(
offset <= new_offset);
107 int64 &sequence_number,
int64 &commit_parent);
190 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:95
Logical_clock get_max_committed_transaction()
Definition: rpl_trx_tracking.h:111
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:131
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:120
Logical_clock m_transaction_counter
Definition: rpl_trx_tracking.h:123
Logical timestamp generator for logical timestamping binlog transactions.
Definition: rpl_trx_tracking.h:45
Logical_clock(const Logical_clock &other)
Definition: rpl_trx_tracking.h:59
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:72
std::atomic< int64 > state
Definition: rpl_trx_tracking.h:47
Logical_clock()
Definition: rpl_trx_tracking.cc:44
int64 offset
Definition: rpl_trx_tracking.h:55
int64 get_timestamp()
Atomically fetch the current state.
Definition: rpl_trx_tracking.cc:50
int64 get_offset()
Definition: rpl_trx_tracking.h:65
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:185
Transaction_dependency_tracker()
Definition: rpl_trx_tracking.h:187
void rotate()
Definition: rpl_trx_tracking.cc:340
Commit_order_trx_dependency_tracker m_commit_order
Definition: rpl_trx_tracking.h:203
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:202
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:199
Generate logical timestamps for MTS using WRITESET binlog transaction dependency tracking algorithm.
Definition: rpl_trx_tracking.h:141
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:143
std::map< uint64, int64 > Writeset_history
Definition: rpl_trx_tracking.h:176
Writeset_history m_writeset_history
Definition: rpl_trx_tracking.h:177
std::atomic< ulong > m_opt_max_history_size
Definition: rpl_trx_tracking.h:158
int64 m_writeset_history_start
Definition: rpl_trx_tracking.h:170
const int64_t SEQ_UNINIT
Uninitialized timestamp value (for either last committed or sequence number).
Definition: binlog_event.h:158
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