Generate logical timestamps for MTS using WRITESET binlog transaction dependency tracking algorithm.
More...
Generate logical timestamps for MTS using WRITESET binlog transaction dependency tracking algorithm.
Tracks dependencies based on the set of rows updated. Any two transactions that change disjoint sets of rows, are said concurrent and non-contending.
void Writeset_trx_dependency_tracker::get_dependency |
( |
THD * |
thd, |
|
|
int64 & |
sequence_number, |
|
|
int64 & |
commit_parent |
|
) |
| |
Main function that gets the dependencies using the WRITESET tracker.
Get the writeset dependencies of a transaction.
- Parameters
-
[in] | thd | THD of the caller. |
[in,out] | sequence_number | sequence_number initialized and returned. |
[in,out] | commit_parent | commit_parent to be returned. |
This takes the commit_parent that must be previously set using Commit_order_trx_dependency_tracker and tries to make the commit_parent as low as possible, using the writesets of each transaction. The commit_parent returned depends on how many row hashes are stored in the writeset_history, which is cleared once it reaches the user-defined maximum.
- Parameters
-
[in] | thd | Current THD from which to extract trx context. |
[in,out] | sequence_number | Sequence number of current transaction. |
[in,out] | commit_parent | Commit_parent of current transaction, pre-filled with the commit_parent calculated by Commit_order_trx_dependency_tracker to use when the writeset commit_parent is not valid. |