MySQL 8.0.39
Source Code Documentation
|
Queue element, holding the needed information to manage the commit ordering. More...
#include <commit_order_queue.h>
Public Member Functions | |
bool | freeze_commit_sequence_nr (Commit_order_queue::sequence_type expected) |
Marks the commit request sequence number this node's worker is processing as frozen iff the sequence number current value is equal to the expected parameter. More... | |
bool | unfreeze_commit_sequence_nr (Commit_order_queue::sequence_type previously_frozen) |
Removes the frozen mark from the commit request sequence number this node's worker is processing if it was previously frozen. More... | |
Public Attributes | |
value_type | m_worker_id {NO_WORKER} |
The identifier of the worker that maps to a queue index. More... | |
MDL_context * | m_mdl_context {nullptr} |
The MDL context to be used to wait on the MDL graph. More... | |
memory::Aligned_atomic< Commit_order_queue::enum_worker_stage > | m_stage |
Which stage is the worker on. More... | |
Private Member Functions | |
Commit_order_queue::sequence_type | reset_commit_sequence_nr () |
Sets the commit request sequence number for this node as unassigned. More... | |
Private Attributes | |
memory::Aligned_atomic< Commit_order_queue::sequence_type > | m_commit_sequence_nr {NO_SEQUENCE_NR} |
The sequence number for the commit request this node's worker is processing. More... | |
Static Private Attributes | |
static constexpr Commit_order_queue::sequence_type | NO_SEQUENCE_NR {0} |
static constexpr Commit_order_queue::sequence_type | SEQUENCE_NR_FROZEN {1} |
Friends | |
class | Commit_order_queue |
Queue element, holding the needed information to manage the commit ordering.
bool cs::apply::Commit_order_queue::Node::freeze_commit_sequence_nr | ( | Commit_order_queue::sequence_type | expected | ) |
Marks the commit request sequence number this node's worker is processing as frozen iff the sequence number current value is equal to the expected
parameter.
Commit request sequence numbers are monotonically ever increasing numbers that are used by worker threads to ensure ownership of the worker commit turn unblocking operation: 1) A worker holding a sequence number N
can only unblock worker with sequence number N + 1
. 2) A worker with sequence number N + 1
can't be assigned a new sequence number if worker with sequence number N
is executing the unblocking operation.
expected | the commit request sequence number this node must currently hold in order for it to be frozen |
|
private |
Sets the commit request sequence number for this node as unassigned.
If the sequence number is currently frozen, invoking this method will make the invoking thread to spin until the sequence number is unfrozen.
Commit request sequence numbers are monotonically ever increasing numbers that are used by worker threads to ensure ownership of the worker commit turn unblocking operation: 1) A worker holding a sequence number N
can only unblock worker with sequence number N + 1
. 2) A worker with sequence number N + 1
can't be assigned a new sequence number if worker with sequence number N
is executing the unblocking operation.
bool cs::apply::Commit_order_queue::Node::unfreeze_commit_sequence_nr | ( | Commit_order_queue::sequence_type | previously_frozen | ) |
Removes the frozen mark from the commit request sequence number this node's worker is processing if it was previously frozen.
Commit request sequence numbers are monotonically ever increasing numbers that are used by worker threads to ensure ownership of the worker commit turn unblocking operation: 1) A worker holding a sequence number N
can only unblock worker with sequence number N + 1
. 2) A worker with sequence number N + 1
can't be assigned a new sequence number if worker with sequence number N
is executing the unblocking operation.
previously_frozen | the sequence number value that was provided while previously freezing. |
|
friend |
|
private |
The sequence number for the commit request this node's worker is processing.
MDL_context* cs::apply::Commit_order_queue::Node::m_mdl_context {nullptr} |
The MDL context to be used to wait on the MDL graph.
memory::Aligned_atomic<Commit_order_queue::enum_worker_stage> cs::apply::Commit_order_queue::Node::m_stage |
Which stage is the worker on.
value_type cs::apply::Commit_order_queue::Node::m_worker_id {NO_WORKER} |
The identifier of the worker that maps to a queue index.
|
staticconstexprprivate |
|
staticconstexprprivate |