![]() |
MySQL 26.7.0
Source Code Documentation
|
Class representing the interface for parallel worker context. More...
#include <parallel_worker_context.h>
Public Types | |
| using | Trx_id = int64_t |
| using | Worker_id = uint64_t |
| using | Channel_id = std::string |
Public Member Functions | |
| Parallel_worker_context ()=default | |
| virtual | ~Parallel_worker_context ()=default |
| virtual void | report_commit_order_deadlock (bool for_self=false)=0 |
| Indicates that commit order deadlock has been found. More... | |
| virtual bool | found_commit_order_deadlock () const =0 |
| Checks if commit order deadlock has been found. More... | |
| virtual void | reset_commit_order_deadlock ()=0 |
| Resets commit order deadlock. More... | |
| virtual bool | is_same_channel (const Parallel_worker_context *other) const =0 |
| Checks if arg parallel worker executes transaction coming from the same channel. More... | |
| virtual THD * | get_transaction_ctx ()=0 |
| Returns transaction id (we use sequence number) More... | |
| virtual instruments::Worker_metrics & | get_worker_metrics ()=0 |
| Obtains worker metrics. More... | |
| virtual Worker_id | get_worker_id () const =0 |
| Returns worker id. More... | |
| virtual MDL_context * | get_mdl_context ()=0 |
| Obtains MDL context needed for commit. More... | |
| virtual bool | can_be_retried (THD *thd)=0 |
| Returns information on whether THD transaction can be retried. More... | |
| virtual Trx_id | get_trx_id ()=0 |
| Obtain transaction id (sequence number) More... | |
| virtual const char * | get_for_channel_id (bool) const |
| Get "for channel" id. More... | |
| virtual bool | is_csa () const |
| Checks whether this worker is CSA worker. More... | |
Class representing the interface for parallel worker context.
It accesses basic information like worker id, transaction id, channel id and other functionatlities needed by the commit order manager.
| using cs::apply::Parallel_worker_context::Channel_id = std::string |
| using cs::apply::Parallel_worker_context::Trx_id = int64_t |
| using cs::apply::Parallel_worker_context::Worker_id = uint64_t |
|
default |
|
virtualdefault |
|
pure virtual |
Returns information on whether THD transaction can be retried.
Implemented in cs::apply::Csa_worker_context, and Slave_worker.
|
pure virtual |
Checks if commit order deadlock has been found.
Implemented in cs::apply::Csa_worker_context, and Slave_worker.
|
inlinevirtual |
Get "for channel" id.
Builds string in flight when needed Pass true as boolean argument if upper case is needed
Reimplemented in cs::apply::Csa_worker_context.
|
pure virtual |
Obtains MDL context needed for commit.
Implemented in cs::apply::Csa_worker_context, and Slave_worker.
|
pure virtual |
Returns transaction id (we use sequence number)
Implemented in cs::apply::Csa_worker_context, and Slave_worker.
|
pure virtual |
Obtain transaction id (sequence number)
Implemented in cs::apply::Csa_worker_context, and Slave_worker.
|
pure virtual |
Returns worker id.
Implemented in cs::apply::Csa_worker_context, and Slave_worker.
|
pure virtual |
Obtains worker metrics.
Implemented in cs::apply::Csa_worker_context, and Slave_worker.
|
inlinevirtual |
Checks whether this worker is CSA worker.
Reimplemented in cs::apply::Csa_worker_context.
|
pure virtual |
Checks if arg parallel worker executes transaction coming from the same channel.
Implemented in cs::apply::Csa_worker_context, and Slave_worker.
|
pure virtual |
Indicates that commit order deadlock has been found.
| for_self | When true, a thread reports for its own |
Implemented in cs::apply::Csa_worker_context, and Slave_worker.
|
pure virtual |
Resets commit order deadlock.
Implemented in cs::apply::Csa_worker_context, and Slave_worker.