MySQL 9.0.0
Source Code Documentation
Commit_order_lock_graph Class Reference

MDL subgraph inspector class to be used as a ticket to wait on by worker threads. More...

#include <rpl_replica_commit_order_manager.h>

Inheritance diagram for Commit_order_lock_graph:
[legend]

Public Member Functions

 Commit_order_lock_graph (MDL_context &ctx, Commit_order_manager &mngr, uint32 worker_id)
 Constructor for the class. More...
 
virtual ~Commit_order_lock_graph () override=default
 Default destructor. More...
 
MDL_contextget_ctx () const
 Retrieves the MDL context object associated with the underlying worker. More...
 
uint32 get_worker_id () const
 Retrieves the identifier for the underlying worker thread. More...
 
bool accept_visitor (MDL_wait_for_graph_visitor *dvisitor) override
 Determines if the underlying worker is in deadlock with the MDL context encapsulated in the visitor parameter. More...
 
uint get_deadlock_weight () const override
 Retrieves the deadlock weight to be used to replace a visitor victim's, when more than one deadlock is found. More...
 
- Public Member Functions inherited from MDL_wait_for_subgraph
virtual ~MDL_wait_for_subgraph ()
 

Private Attributes

MDL_contextm_ctx
 The MDL context object associated with the underlying worker. More...
 
Commit_order_managerm_mngr
 The Commit_order_manager instance associated with the underlying worker channel's Relay_log_info object. More...
 
uint32 m_worker_id {0}
 The identifier for the underlying worker thread. More...
 

Additional Inherited Members

- Static Public Attributes inherited from MDL_wait_for_subgraph
static const uint DEADLOCK_WEIGHT_CO = 0
 
static const uint DEADLOCK_WEIGHT_DML = 25
 
static const uint DEADLOCK_WEIGHT_ULL = 50
 
static const uint DEADLOCK_WEIGHT_DDL = 100
 

Detailed Description

MDL subgraph inspector class to be used as a ticket to wait on by worker threads.

Each worker will create its own instance of this class and will use its own THD MDL_context to search for deadlocks.

Constructor & Destructor Documentation

◆ Commit_order_lock_graph()

Commit_order_lock_graph::Commit_order_lock_graph ( MDL_context ctx,
Commit_order_manager mngr,
uint32  worker_id 
)

Constructor for the class.

Parameters
ctxThe worker THD MDL context object.
mngrThe Commit_order_manager instance associated with the current channel's Relay_log_info object.
worker_idThe identifier of the worker targeted by this object.

◆ ~Commit_order_lock_graph()

virtual Commit_order_lock_graph::~Commit_order_lock_graph ( )
overridevirtualdefault

Default destructor.

Member Function Documentation

◆ accept_visitor()

bool Commit_order_lock_graph::accept_visitor ( MDL_wait_for_graph_visitor dvisitor)
overridevirtual

Determines if the underlying worker is in deadlock with the MDL context encapsulated in the visitor parameter.

Parameters
dvisitorThe MDL graph visitor to check for deadlocks against.
Returns
true if a deadlock was found and false otherwise,

Implements MDL_wait_for_subgraph.

◆ get_ctx()

MDL_context * Commit_order_lock_graph::get_ctx ( ) const

Retrieves the MDL context object associated with the underlying worker.

Returns
A pointer to the MDL context associated with the underlying worker thread.

◆ get_deadlock_weight()

uint Commit_order_lock_graph::get_deadlock_weight ( ) const
overridevirtual

Retrieves the deadlock weight to be used to replace a visitor victim's, when more than one deadlock is found.

Implements MDL_wait_for_subgraph.

◆ get_worker_id()

uint32 Commit_order_lock_graph::get_worker_id ( ) const

Retrieves the identifier for the underlying worker thread.

Returns
The identifier for the underlying worker thread.

Member Data Documentation

◆ m_ctx

MDL_context& Commit_order_lock_graph::m_ctx
private

The MDL context object associated with the underlying worker.

◆ m_mngr

Commit_order_manager& Commit_order_lock_graph::m_mngr
private

The Commit_order_manager instance associated with the underlying worker channel's Relay_log_info object.

◆ m_worker_id

uint32 Commit_order_lock_graph::m_worker_id {0}
private

The identifier for the underlying worker thread.


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