MySQL 9.1.0
Source Code Documentation
Group_partition_handling Class Reference

#include <group_partition_handling.h>

Public Member Functions

 Group_partition_handling (ulong unreachable_timeout)
 
virtual ~Group_partition_handling ()
 The class destructor. More...
 
int partition_thread_handler ()
 The thread handler. More...
 
int launch_partition_handler_thread ()
 Launch the partition thread handler. More...
 
int terminate_partition_handler_thread ()
 Terminate the partition thread handler. More...
 
bool is_member_on_partition ()
 Is the member currently/or was on a partition? More...
 
bool is_partition_handler_running ()
 Is the partition handler thread running. More...
 
void update_timeout_on_unreachable (ulong unreachable_timeout)
 Updates the timeout when the member becomes unreachable. More...
 
ulong get_timeout_on_unreachable ()
 
bool abort_partition_handler_if_running ()
 Signals the thread to abort the waiting process. More...
 
bool is_partition_handling_terminated ()
 

Private Attributes

bool member_in_partition
 Is member in partition. More...
 
thread_state group_partition_thd_state
 Group partition thread state. More...
 
bool partition_handling_aborted
 Should we abort the process that will kill pending transaction. More...
 
bool partition_handling_terminated
 Did the partition handler terminate and killed pending transactions. More...
 
ulong timeout_on_unreachable
 The number of seconds until the member goes into error state. More...
 
my_thread_handle partition_trx_handler_pthd
 
mysql_mutex_t run_lock
 
mysql_cond_t run_cond
 
mysql_mutex_t trx_termination_aborted_lock
 
mysql_cond_t trx_termination_aborted_cond
 

Constructor & Destructor Documentation

◆ Group_partition_handling()

Group_partition_handling::Group_partition_handling ( ulong  unreachable_timeout)

◆ ~Group_partition_handling()

Group_partition_handling::~Group_partition_handling ( )
virtual

The class destructor.

Member Function Documentation

◆ abort_partition_handler_if_running()

bool Group_partition_handling::abort_partition_handler_if_running ( )

Signals the thread to abort the waiting process.

Returns
the operation status
Return values
trueIt already killed pending transactions and left the group
falseThe thread was not running, or was aborted in time.

◆ get_timeout_on_unreachable()

ulong Group_partition_handling::get_timeout_on_unreachable ( )
Returns
the configured timeout
Return values
0The partition thread won't run or timeout.
>0After this seconds the plugin will move to ERROR in a minority

◆ is_member_on_partition()

bool Group_partition_handling::is_member_on_partition ( )

Is the member currently/or was on a partition?

Note
this flag is set to true whenever the partition handler is launched and set to false whenever someone tries to abort it.
Returns
is member on partition, or was on one
Return values
trueyes
falseno

◆ is_partition_handler_running()

bool Group_partition_handling::is_partition_handler_running ( )

Is the partition handler thread running.

Returns
true if running, false otherwise

◆ is_partition_handling_terminated()

bool Group_partition_handling::is_partition_handling_terminated ( )
Returns
is the process finished
Return values
trueIt already killed pending transactions and left the group
falseThe thread was not running, or was aborted.

◆ launch_partition_handler_thread()

int Group_partition_handling::launch_partition_handler_thread ( )

Launch the partition thread handler.

Returns
the operation status
Return values
0OK
!=0Error

◆ partition_thread_handler()

int Group_partition_handling::partition_thread_handler ( )

The thread handler.

Return values
0OK
!=0Error

◆ terminate_partition_handler_thread()

int Group_partition_handling::terminate_partition_handler_thread ( )

Terminate the partition thread handler.

Returns
the operation status
Return values
0OK
!=0Error

◆ update_timeout_on_unreachable()

void Group_partition_handling::update_timeout_on_unreachable ( ulong  unreachable_timeout)

Updates the timeout when the member becomes unreachable.

Parameters
unreachable_timeoutThe timeout before going into error

Member Data Documentation

◆ group_partition_thd_state

thread_state Group_partition_handling::group_partition_thd_state
private

Group partition thread state.

◆ member_in_partition

bool Group_partition_handling::member_in_partition
private

Is member in partition.

◆ partition_handling_aborted

bool Group_partition_handling::partition_handling_aborted
private

Should we abort the process that will kill pending transaction.

◆ partition_handling_terminated

bool Group_partition_handling::partition_handling_terminated
private

Did the partition handler terminate and killed pending transactions.

◆ partition_trx_handler_pthd

my_thread_handle Group_partition_handling::partition_trx_handler_pthd
private

◆ run_cond

mysql_cond_t Group_partition_handling::run_cond
private

◆ run_lock

mysql_mutex_t Group_partition_handling::run_lock
private

◆ timeout_on_unreachable

ulong Group_partition_handling::timeout_on_unreachable
private

The number of seconds until the member goes into error state.

◆ trx_termination_aborted_cond

mysql_cond_t Group_partition_handling::trx_termination_aborted_cond
private

◆ trx_termination_aborted_lock

mysql_mutex_t Group_partition_handling::trx_termination_aborted_lock
private

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