MySQL 26.7.0
Source Code Documentation
mysql::csa::Rescue_task Class Reference

Rescue task to rollback conflicting transaction. More...

#include <rescue_task.h>

Public Member Functions

 Rescue_task (Relay_log_info *rli, Rescue_operation_type op_type, std::promise< bool > &action_promise, int job_id)
 Constructor. More...
 
 Rescue_task ()=default
 Default constructor, required by synchronized queue. More...
 
void operator() ()
 Perform rescue operation. More...
 
void set_promise ()
 Sets promise value, e.g. in case when task cannot be executed (stop) More...
 

Private Member Functions

void rollback_trx ()
 Rolls back transaction attached to RLI. More...
 

Private Attributes

Relay_log_infom_rli {nullptr}
 RLI attached to the transaction to rescue. More...
 
Rescue_operation_type m_rescue_operation_type
 Rescue operation type. More...
 
std::optional< std::reference_wrapper< std::promise< bool > > > m_action_promise
 Promise to synchronize on after operation is done. More...
 
int m_job_id {0}
 Job internal identifier. More...
 

Detailed Description

Rescue task to rollback conflicting transaction.

Constructor & Destructor Documentation

◆ Rescue_task() [1/2]

mysql::csa::Rescue_task::Rescue_task ( Relay_log_info rli,
Rescue_operation_type  op_type,
std::promise< bool > &  action_promise,
int  job_id 
)

Constructor.

Parameters
rliRLI attached to the transaction to rescue
op_typeRescue operation type
action_promisePromise used to synchronize thread waiting for rescue operation to finish
job_idJob internal identifier

◆ Rescue_task() [2/2]

mysql::csa::Rescue_task::Rescue_task ( )
default

Default constructor, required by synchronized queue.

Member Function Documentation

◆ operator()()

void mysql::csa::Rescue_task::operator() ( void  )

Perform rescue operation.

◆ rollback_trx()

void mysql::csa::Rescue_task::rollback_trx ( )
private

Rolls back transaction attached to RLI.

◆ set_promise()

void mysql::csa::Rescue_task::set_promise ( )

Sets promise value, e.g. in case when task cannot be executed (stop)

Member Data Documentation

◆ m_action_promise

std::optional<std::reference_wrapper<std::promise<bool> > > mysql::csa::Rescue_task::m_action_promise
private

Promise to synchronize on after operation is done.

◆ m_job_id

int mysql::csa::Rescue_task::m_job_id {0}
private

Job internal identifier.

◆ m_rescue_operation_type

Rescue_operation_type mysql::csa::Rescue_task::m_rescue_operation_type
private
Initial value:

Rescue operation type.

◆ m_rli

Relay_log_info* mysql::csa::Rescue_task::m_rli {nullptr}
private

RLI attached to the transaction to rescue.


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