MySQL  8.0.22
Source Code Documentation
Hold_transactions Class Reference

Class that contains the logic to hold transactions when group_replication_consistency is set to BEFORE_ON_PRIMARY_FAILOVER. More...

#include <hold_transactions.h>

Public Member Functions

 Hold_transactions ()
 Class constructor for hold transaction logic. More...
 
 ~Hold_transactions ()
 Class destructor for hold transaction logic. More...
 
void enable ()
 Method to enable the hold of transactions when a primary election is occurring. More...
 
void disable ()
 Method to resume transactions on hold, primary election ended. More...
 
int wait_until_primary_failover_complete (ulong hold_timeout)
 Method to wait for a primary failover to be complete. More...
 

Private Member Functions

bool is_thread_killed ()
 Method to verify if thread is killed. More...
 

Private Attributes

bool applying_backlog = false
 is plugin currently applying backlog More...
 
mysql_mutex_t primary_promotion_policy_mutex
 protect and notify changes on applying_backlog More...
 
mysql_cond_t primary_promotion_policy_condition
 

Detailed Description

Class that contains the logic to hold transactions when group_replication_consistency is set to BEFORE_ON_PRIMARY_FAILOVER.

Constructor & Destructor Documentation

◆ Hold_transactions()

Hold_transactions::Hold_transactions ( )

Class constructor for hold transaction logic.

◆ ~Hold_transactions()

Hold_transactions::~Hold_transactions ( )

Class destructor for hold transaction logic.

Member Function Documentation

◆ disable()

void Hold_transactions::disable ( )

Method to resume transactions on hold, primary election ended.

◆ enable()

void Hold_transactions::enable ( )

Method to enable the hold of transactions when a primary election is occurring.

◆ is_thread_killed()

bool Hold_transactions::is_thread_killed ( )
inlineprivate

Method to verify if thread is killed.

◆ wait_until_primary_failover_complete()

int Hold_transactions::wait_until_primary_failover_complete ( ulong  hold_timeout)

Method to wait for a primary failover to be complete.

Parameters
hold_timeoutseconds to abort wait
Returns
the operation status
Return values
0if success
!=0mysqld error code

Member Data Documentation

◆ applying_backlog

bool Hold_transactions::applying_backlog = false
private

is plugin currently applying backlog

◆ primary_promotion_policy_condition

mysql_cond_t Hold_transactions::primary_promotion_policy_condition
private

◆ primary_promotion_policy_mutex

mysql_mutex_t Hold_transactions::primary_promotion_policy_mutex
private

protect and notify changes on applying_backlog


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