MySQL 8.4.2
Source Code Documentation
|
This class is a core component of the database state machine replication protocol. More...
#include <certifier.h>
Public Member Functions | |
Certifier_broadcast_thread () | |
Certifier_broadcast_thread constructor. More... | |
virtual | ~Certifier_broadcast_thread () |
int | initialize () |
Initialize broadcast thread. More... | |
int | terminate () |
Terminate broadcast thread. More... | |
void | dispatcher () |
Broadcast thread worker method. More... | |
Static Public Attributes | |
static const int | BROADCAST_GTID_EXECUTED_PERIOD = 60 |
Period (in seconds) between stable transactions set broadcast. More... | |
Private Member Functions | |
int | broadcast_gtid_executed () |
Broadcast local GTID_EXECUTED to group. More... | |
Private Attributes | |
bool | aborted |
Thread control. More... | |
THD * | broadcast_thd |
my_thread_handle | broadcast_pthd |
mysql_mutex_t | broadcast_run_lock |
mysql_cond_t | broadcast_run_cond |
mysql_mutex_t | broadcast_dispatcher_lock |
mysql_cond_t | broadcast_dispatcher_cond |
thread_state | broadcast_thd_state |
size_t | broadcast_counter |
int | broadcast_gtid_executed_period |
This class is a core component of the database state machine replication protocol.
It implements conflict detection based on a certification procedure.
Snapshot Isolation is based on assigning logical timestamp to optimistic transactions, i.e. the ones which successfully meet certification and are good to commit on all members in the group. This timestamp is a monotonically increasing counter, and is same across all members in the group.
This timestamp, which in our algorithm is the snapshot version, is further used to update the certification info. The snapshot version maps the items in a transaction to the GTID_EXECUTED that this transaction saw when it was executed, that is, on which version the transaction was executed.
If the incoming transaction snapshot version is a subset of a previous certified transaction for the same write set, the current transaction was executed on top of outdated data, so it will be negatively certified. Otherwise, this transaction is marked certified and goes into applier.
Certifier_broadcast_thread::Certifier_broadcast_thread | ( | ) |
Certifier_broadcast_thread constructor.
|
virtual |
|
private |
Broadcast local GTID_EXECUTED to group.
0 | OK |
!=0 | Error |
void Certifier_broadcast_thread::dispatcher | ( | ) |
Broadcast thread worker method.
int Certifier_broadcast_thread::initialize | ( | ) |
Initialize broadcast thread.
0 | OK |
!=0 | Error |
int Certifier_broadcast_thread::terminate | ( | ) |
Terminate broadcast thread.
0 | OK |
!=0 | Error |
|
private |
Thread control.
|
private |
|
private |
|
private |
|
static |
Period (in seconds) between stable transactions set broadcast.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |