1#ifndef RPL_TRX_TRACKING_INCLUDED
24#define RPL_TRX_TRACKING_INCLUDED
72 assert(
offset <= new_offset);
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:83
Logical_clock get_max_committed_transaction()
Definition: rpl_trx_tracking.h:96
void rotate()
Definition: rpl_trx_tracking.cc:180
int64 step()
Definition: rpl_trx_tracking.cc:176
int64 m_last_blocking_transaction
Definition: rpl_trx_tracking.h:116
void update_max_committed(int64 sequence_number)
Definition: rpl_trx_tracking.cc:187
void get_dependency(THD *thd, int64 &sequence_number, int64 &commit_parent)
Main function that gets the dependencies using the COMMIT_ORDER tracker.
Definition: rpl_trx_tracking.cc:145
Logical_clock m_max_committed_transaction
Definition: rpl_trx_tracking.h:105
Logical_clock m_transaction_counter
Definition: rpl_trx_tracking.h:108
Logical timestamp generator for logical timestamping binlog transactions.
Definition: rpl_trx_tracking.h:44
Logical_clock(const Logical_clock &other)
Definition: rpl_trx_tracking.h:58
int64 step()
Steps the absolute value of the clock (state) to return an updated value.
Definition: rpl_trx_tracking.cc:64
int64 set_if_greater(int64 new_val)
To try setting the clock forward.
Definition: rpl_trx_tracking.cc:82
void update_offset(int64 new_offset)
Definition: rpl_trx_tracking.h:71
std::atomic< int64 > state
Definition: rpl_trx_tracking.h:46
Logical_clock()
Definition: rpl_trx_tracking.cc:43
int64 offset
Definition: rpl_trx_tracking.h:54
int64 get_timestamp()
Atomically fetch the current state.
Definition: rpl_trx_tracking.cc:49
int64 get_offset()
Definition: rpl_trx_tracking.h:64
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:33
Dependency tracker is a container singleton that dispatches between the three methods associated with...
Definition: rpl_trx_tracking.h:216
long m_opt_tracking_mode
Definition: rpl_trx_tracking.h:234
Writeset_session_trx_dependency_tracker m_writeset_session
Definition: rpl_trx_tracking.h:241
Transaction_dependency_tracker()
Definition: rpl_trx_tracking.h:218
void rotate()
Definition: rpl_trx_tracking.cc:388
Commit_order_trx_dependency_tracker m_commit_order
Definition: rpl_trx_tracking.h:240
void update_max_committed(THD *thd)
The method is to be executed right before committing time.
Definition: rpl_trx_tracking.cc:373
void get_dependency(THD *thd, 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:326
Writeset_trx_dependency_tracker m_writeset
Definition: rpl_trx_tracking.h:239
int64 get_max_committed_timestamp()
Definition: rpl_trx_tracking.cc:398
int64 step()
Definition: rpl_trx_tracking.cc:386
void tracking_mode_changed()
Definition: rpl_trx_tracking.cc:353
Writeset_trx_dependency_tracker * get_writeset()
Definition: rpl_trx_tracking.h:236
Generate logical timestamps for MTS using WRITESET_SESSION in the binlog-transaction-dependency-track...
Definition: rpl_trx_tracking.h:167
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:310
Generate logical timestamps for MTS using WRITESET in the binlog-transaction-dependency-tracking opti...
Definition: rpl_trx_tracking.h:123
void rotate(int64 start)
Definition: rpl_trx_tracking.cc:295
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:208
Writeset_trx_dependency_tracker(ulong max_history_size)
Definition: rpl_trx_tracking.h:125
std::map< uint64, int64 > Writeset_history
Definition: rpl_trx_tracking.h:159
Writeset_history m_writeset_history
Definition: rpl_trx_tracking.h:160
std::atomic< ulong > m_opt_max_history_size
Definition: rpl_trx_tracking.h:140
int64 m_writeset_history_start
Definition: rpl_trx_tracking.h:153
const int64_t SEQ_UNINIT
Uninitialized timestamp value (for either last committed or sequence number).
Definition: binlog_event.h:146
static void start(mysql_harness::PluginFuncEnv *env)
Definition: http_auth_backend_plugin.cc:176
Some integer typedefs for easier portability.
int64_t int64
Definition: my_inttypes.h:67
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:307
enum_binlog_transaction_dependency_tracking
Modes for parallel transaction dependency tracking.
Definition: rpl_trx_tracking.h:182
@ DEPENDENCY_TRACKING_WRITESET_SESSION
Tracks dependencies based on the set of rows updated per session.
Definition: rpl_trx_tracking.h:208
@ DEPENDENCY_TRACKING_COMMIT_ORDER
Tracks dependencies based on the commit order of transactions.
Definition: rpl_trx_tracking.h:195
@ DEPENDENCY_TRACKING_WRITESET
Tracks dependencies based on the set of rows updated.
Definition: rpl_trx_tracking.h:200