MySQL  8.0.27
Source Code Documentation
rpl_trx_tracking.h File Reference
#include <assert.h>
#include <sys/types.h>
#include <atomic>
#include <map>
#include "libbinlogevents/include/binlog_event.h"
#include "my_inttypes.h"

Go to the source code of this file.

Classes

class  Logical_clock
 Logical timestamp generator for logical timestamping binlog transactions. More...
 
class  Commit_order_trx_dependency_tracker
 Generate logical timestamps for MTS using COMMIT_ORDER in the binlog-transaction-dependency-tracking option. More...
 
class  Writeset_trx_dependency_tracker
 Generate logical timestamps for MTS using WRITESET in the binlog-transaction-dependency-tracking option. More...
 
class  Writeset_session_trx_dependency_tracker
 Generate logical timestamps for MTS using WRITESET_SESSION in the binlog-transaction-dependency-tracking option. More...
 
class  Transaction_dependency_tracker
 Dependency tracker is a container singleton that dispatches between the three methods associated with the binlog-transaction-dependency-tracking option. More...
 

Enumerations

enum  enum_binlog_transaction_dependency_tracking { DEPENDENCY_TRACKING_COMMIT_ORDER = 0 , DEPENDENCY_TRACKING_WRITESET = 1 , DEPENDENCY_TRACKING_WRITESET_SESSION = 2 }
 Modes for parallel transaction dependency tracking. More...
 

Enumeration Type Documentation

◆ enum_binlog_transaction_dependency_tracking

Modes for parallel transaction dependency tracking.

Enumerator
DEPENDENCY_TRACKING_COMMIT_ORDER 

Tracks dependencies based on the commit order of transactions.

The time intervals during which any transaction holds all its locks are tracked (the interval ends just before storage engine commit, when locks are released. For an autocommit transaction it begins just before storage engine prepare. For BEGIN..COMMIT transactions it begins at the end of the last statement before COMMIT). Two transactions are marked as non-conflicting if their respective intervals overlap. In other words, if trx1 appears before trx2 in the binlog, and trx2 had acquired all its locks before trx1 released its locks, then trx2 is marked such that the slave can schedule it in parallel with trx1.

DEPENDENCY_TRACKING_WRITESET 

Tracks dependencies based on the set of rows updated.

Any two transactions that change disjoint sets of rows, are said concurrent and non-contending.

DEPENDENCY_TRACKING_WRITESET_SESSION 

Tracks dependencies based on the set of rows updated per session.

Any two transactions that change disjoint sets of rows, on different sessions, are said concurrent and non-contending. Transactions from the same session are always said to be dependent, i.e., are never concurrent and non-contending.