1#ifndef RPL_TRX_TRACKING_INCLUDED
25#define RPL_TRX_TRACKING_INCLUDED
73 assert(
offset <= new_offset);
227 int64 &sequence_number,
int64 &commit_parent);
Contains the classes representing events occurring in the replication stream.
Generate logical timestamps for MTS using COMMIT_ORDER in the binlog-transaction-dependency-tracking ...
Definition: rpl_trx_tracking.h:84
Logical_clock get_max_committed_transaction()
Definition: rpl_trx_tracking.h:100
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:120
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:109
Logical_clock m_transaction_counter
Definition: rpl_trx_tracking.h:112
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:34
Dependency tracker is a container singleton that dispatches between the three methods associated with...
Definition: rpl_trx_tracking.h:220
long m_opt_tracking_mode
Definition: rpl_trx_tracking.h:239
Writeset_session_trx_dependency_tracker m_writeset_session
Definition: rpl_trx_tracking.h:246
Transaction_dependency_tracker()
Definition: rpl_trx_tracking.h:222
void rotate()
Definition: rpl_trx_tracking.cc:396
Commit_order_trx_dependency_tracker m_commit_order
Definition: rpl_trx_tracking.h:245
void update_max_committed(THD *thd)
The method is to be executed right before committing time.
Definition: rpl_trx_tracking.cc:381
Writeset_trx_dependency_tracker m_writeset
Definition: rpl_trx_tracking.h:244
int64 get_max_committed_timestamp()
Definition: rpl_trx_tracking.cc:406
int64 step()
Definition: rpl_trx_tracking.cc:394
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:330
void tracking_mode_changed()
Definition: rpl_trx_tracking.cc:361
Writeset_trx_dependency_tracker * get_writeset()
Definition: rpl_trx_tracking.h:241
Generate logical timestamps for MTS using WRITESET_SESSION in the binlog-transaction-dependency-track...
Definition: rpl_trx_tracking.h:171
void get_dependency(THD *thd, int64 &sequence_number, int64 &commit_parent)
Main function that gets the dependencies using the WRITESET_SESSION tracker.
Definition: rpl_trx_tracking.cc:314
Generate logical timestamps for MTS using WRITESET in the binlog-transaction-dependency-tracking opti...
Definition: rpl_trx_tracking.h:127
void rotate(int64 start)
Definition: rpl_trx_tracking.cc:299
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:129
std::map< uint64, int64 > Writeset_history
Definition: rpl_trx_tracking.h:163
Writeset_history m_writeset_history
Definition: rpl_trx_tracking.h:164
std::atomic< ulong > m_opt_max_history_size
Definition: rpl_trx_tracking.h:144
int64 m_writeset_history_start
Definition: rpl_trx_tracking.h:157
const int64_t SEQ_UNINIT
Uninitialized timestamp value (for either last committed or sequence number).
Definition: binlog_event.h:147
static void start(mysql_harness::PluginFuncEnv *env)
Definition: http_auth_backend_plugin.cc:177
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
enum_binlog_transaction_dependency_tracking
Modes for parallel transaction dependency tracking.
Definition: rpl_trx_tracking.h:186
@ DEPENDENCY_TRACKING_WRITESET_SESSION
Tracks dependencies based on the set of rows updated per session.
Definition: rpl_trx_tracking.h:212
@ DEPENDENCY_TRACKING_COMMIT_ORDER
Tracks dependencies based on the commit order of transactions.
Definition: rpl_trx_tracking.h:199
@ DEPENDENCY_TRACKING_WRITESET
Tracks dependencies based on the set of rows updated.
Definition: rpl_trx_tracking.h:204