24#ifndef MYSQL_CSA_TASK_EXEC_JOB_H
25#define MYSQL_CSA_TASK_EXEC_JOB_H
A job represents a single unit of work applied by worker pool threads.
Definition: job.h:47
A task that executes a job in the change streams apply system.
Definition: task_exec_job.h:39
std::atomic< bool > & m_applier_stop
If retried, this flag will be checked to determine whether applier has been stopped.
Definition: task_exec_job.h:99
void set_error()
Indicates that a task executed with a non-recoverable error (stop)
Definition: task_exec_job.cpp:40
bool m_is_error
Internal error flag.
Definition: task_exec_job.h:83
uint64_t m_job_id
Job id assigned by the job provider.
Definition: task_exec_job.h:88
bool m_started
Checks if task has been started.
Definition: task_exec_job.h:93
Session_service_ptr m_session_service
Assigned session service handle.
Definition: task_exec_job.h:90
Task_result run(Job *job, uint64_t job_id, unsigned int thread_id)
Function executing a job - internal implementation.
Definition: task_exec_job.cpp:66
bool is_error() const
Checks if task executed with an error - this function is called by Scheduler to get task status.
Definition: task_exec_job.cpp:39
scheduler::Statistics_instance_monitor_ref Stat_monitor_ref
Type alias for the statistics monitor instance for the channel.
Definition: task_exec_job.h:46
std::shared_ptr< Job > m_job
Shared job handle provided by the job provider.
Definition: task_exec_job.h:86
Task_exec_job(Job_ptr job, uint64_t job_id, Session_service_ptr session_service, Stat_monitor_ref stat_monitor, std::atomic< bool > &stop_ref)
Constructor.
Definition: task_exec_job.cpp:42
mysql::csa::Session_service_ptr Session_service_ptr
Type alias for the session service in change streams apply.
Definition: task_exec_job.h:44
Task_result operator()(unsigned int thread_id)
This function executes a job.
Definition: task_exec_job.cpp:52
scheduler::Statistics_instance_monitor_ref m_stat_monitor
Statistics monitoring object for the current instance.
Definition: task_exec_job.h:95
static my_thread_id thread_id
Definition: my_thr_init.cc:60
Definition: channel.cpp:28
std::shared_ptr< Session_service > Session_service_ptr
Shared pointer to Session_service.
Definition: session_service.h:40
std::reference_wrapper< Statistics_instance_monitor > Statistics_instance_monitor_ref
Definition: statistics_instance_monitor.h:43
Task_result
Acceptable task state after its execution.
Definition: task_result.h:32