MySQL 8.3.0
Source Code Documentation
cs::apply::Commit_order_queue::Node Class Reference

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_contextm_mdl_context {nullptr}
 The MDL context to be used to wait on the MDL graph. More...
 
memory::Aligned_atomic< Commit_order_queue::enum_worker_stagem_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_typem_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
 

Detailed Description

Queue element, holding the needed information to manage the commit ordering.

Member Function Documentation

◆ freeze_commit_sequence_nr()

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.

Parameters
expectedthe commit request sequence number this node must currently hold in order for it to be frozen
Returns
true if this nodes commit request sequence number has been frozen, false otherwise.

◆ reset_commit_sequence_nr()

cs::apply::Commit_order_queue::sequence_type cs::apply::Commit_order_queue::Node::reset_commit_sequence_nr ( )
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.

Returns
the sequence number for the commit request sequence number this node's worker is been cleared of

◆ unfreeze_commit_sequence_nr()

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.

Parameters
previously_frozenthe sequence number value that was provided while previously freezing.
Returns
true if this nodes commit request sequence number was frozen and is now unfrozen, false otherwise.

Friends And Related Function Documentation

◆ Commit_order_queue

friend class Commit_order_queue
friend

Member Data Documentation

◆ m_commit_sequence_nr

memory::Aligned_atomic<Commit_order_queue::sequence_type> cs::apply::Commit_order_queue::Node::m_commit_sequence_nr {NO_SEQUENCE_NR}
private

The sequence number for the commit request this node's worker is processing.

◆ m_mdl_context

MDL_context* cs::apply::Commit_order_queue::Node::m_mdl_context {nullptr}

The MDL context to be used to wait on the MDL graph.

◆ m_stage

◆ m_worker_id

value_type cs::apply::Commit_order_queue::Node::m_worker_id {NO_WORKER}

The identifier of the worker that maps to a queue index.

◆ NO_SEQUENCE_NR

constexpr Commit_order_queue::sequence_type cs::apply::Commit_order_queue::Node::NO_SEQUENCE_NR {0}
staticconstexprprivate

◆ SEQUENCE_NR_FROZEN

constexpr Commit_order_queue::sequence_type cs::apply::Commit_order_queue::Node::SEQUENCE_NR_FROZEN {1}
staticconstexprprivate

The documentation for this class was generated from the following files: