1#ifndef RPL_TRX_TRACKING_INCLUDED
25#define RPL_TRX_TRACKING_INCLUDED
73 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:84
Logical_clock get_max_committed_transaction()
Definition: rpl_trx_tracking.h:97
void rotate()
Definition: rpl_trx_tracking.cc:181
int64 step()
Definition: rpl_trx_tracking.cc:177
int64 m_last_blocking_transaction
Definition: rpl_trx_tracking.h:117
void update_max_committed(int64 sequence_number)
Definition: rpl_trx_tracking.cc:188
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:146
Logical_clock m_max_committed_transaction
Definition: rpl_trx_tracking.h:106
Logical_clock m_transaction_counter
Definition: rpl_trx_tracking.h:109
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:217
long m_opt_tracking_mode
Definition: rpl_trx_tracking.h:235
Writeset_session_trx_dependency_tracker m_writeset_session
Definition: rpl_trx_tracking.h:242
Transaction_dependency_tracker()
Definition: rpl_trx_tracking.h:219
void rotate()
Definition: rpl_trx_tracking.cc:389
Commit_order_trx_dependency_tracker m_commit_order
Definition: rpl_trx_tracking.h:241
void update_max_committed(THD *thd)
The method is to be executed right before committing time.
Definition: rpl_trx_tracking.cc:374
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:327
Writeset_trx_dependency_tracker m_writeset
Definition: rpl_trx_tracking.h:240
int64 get_max_committed_timestamp()
Definition: rpl_trx_tracking.cc:399
int64 step()
Definition: rpl_trx_tracking.cc:387
void tracking_mode_changed()
Definition: rpl_trx_tracking.cc:354
Writeset_trx_dependency_tracker * get_writeset()
Definition: rpl_trx_tracking.h:237
Generate logical timestamps for MTS using WRITESET_SESSION in the binlog-transaction-dependency-track...
Definition: rpl_trx_tracking.h:168
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:311
Generate logical timestamps for MTS using WRITESET in the binlog-transaction-dependency-tracking opti...
Definition: rpl_trx_tracking.h:124
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:209
Writeset_trx_dependency_tracker(ulong max_history_size)
Definition: rpl_trx_tracking.h:126
std::map< uint64, int64 > Writeset_history
Definition: rpl_trx_tracking.h:160
Writeset_history m_writeset_history
Definition: rpl_trx_tracking.h:161
std::atomic< ulong > m_opt_max_history_size
Definition: rpl_trx_tracking.h:141
int64 m_writeset_history_start
Definition: rpl_trx_tracking.h:154
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:183
@ DEPENDENCY_TRACKING_WRITESET_SESSION
Tracks dependencies based on the set of rows updated per session.
Definition: rpl_trx_tracking.h:209
@ DEPENDENCY_TRACKING_COMMIT_ORDER
Tracks dependencies based on the commit order of transactions.
Definition: rpl_trx_tracking.h:196
@ DEPENDENCY_TRACKING_WRITESET
Tracks dependencies based on the set of rows updated.
Definition: rpl_trx_tracking.h:201