24#ifndef MYSQL_CS_APPLY_PARALLEL_WORKER_CONTEXT_H
25#define MYSQL_CS_APPLY_PARALLEL_WORKER_CONTEXT_H
90 virtual bool is_csa()
const {
return false; }
On a replica and only on a replica, this class is responsible for committing the applied transactions...
Definition: rpl_replica_commit_order_manager.h:198
Context of the owner of metadata locks.
Definition: mdl.h:1415
Definition: rpl_rli.h:208
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Class representing the interface for parallel worker context.
Definition: parallel_worker_context.h:47
virtual ~Parallel_worker_context()=default
virtual const char * get_for_channel_id(bool) const
Get "for channel" id.
Definition: parallel_worker_context.h:87
virtual THD * get_transaction_ctx()=0
Returns transaction id (we use sequence number)
virtual MDL_context * get_mdl_context()=0
Obtains MDL context needed for commit.
virtual bool can_be_retried(THD *thd)=0
Returns information on whether THD transaction can be retried.
virtual void reset_commit_order_deadlock()=0
Resets commit order deadlock.
int64_t Trx_id
Definition: parallel_worker_context.h:51
virtual void report_commit_order_deadlock(bool for_self=false)=0
Indicates that commit order deadlock has been found.
virtual bool is_same_channel(const Parallel_worker_context *other) const =0
Checks if arg parallel worker executes transaction coming from the same channel.
virtual bool is_csa() const
Checks whether this worker is CSA worker.
Definition: parallel_worker_context.h:90
virtual Trx_id get_trx_id()=0
Obtain transaction id (sequence number)
virtual bool found_commit_order_deadlock() const =0
Checks if commit order deadlock has been found.
virtual instruments::Worker_metrics & get_worker_metrics()=0
Obtains worker metrics.
Parallel_worker_context()=default
virtual Worker_id get_worker_id() const =0
Returns worker id.
std::string Channel_id
Definition: parallel_worker_context.h:53
uint64_t Worker_id
Definition: parallel_worker_context.h:52
Abstract class for classes that contain metrics related to transaction execution in applier workers.
Definition: worker_metrics.h:34
Definition: applier_version.h:27
std::unique_ptr< Parallel_worker_context > Parallel_worker_context_ptr
Definition: parallel_worker_context.h:40