MySQL 8.4.2
Source Code Documentation
Certifier Class Reference

#include <certifier.h>

Inheritance diagram for Certifier:
[legend]

Public Types

typedef std::unordered_map< std::string, Gtid_set_ref *, std::hash< std::string >, std::equal_to< std::string >, Malloc_allocator< std::pair< const std::string, Gtid_set_ref * > > > Certification_info
 
typedef protobuf_replication_group_recovery_metadata::CertificationInformationMap ProtoCertificationInformationMap
 

Public Member Functions

 Certifier ()
 
 ~Certifier () override
 
int initialize (ulonglong gtid_assignment_block_size)
 Initialize certifier. More...
 
int terminate ()
 Terminate certifier. More...
 
void handle_view_change () override
 Handle view changes on certifier. More...
 
int handle_certifier_data (const uchar *data, ulong len, const Gcs_member_identifier &gcs_member_id) override
 Queues the packet coming from the reader for future processing. More...
 
gr::Certified_gtid certify (Gtid_set *snapshot_version, std::list< const char * > *write_set, bool is_gtid_specified, const char *member_uuid, Gtid_log_event *gle, bool local_transaction)
 This member function SHALL certify the set of items against transactions that have already passed the certification test. More...
 
int get_group_stable_transactions_set_string (char **buffer, size_t *length) override
 Returns the transactions in stable set in text format, that is, the set of transactions already applied on all group members. More...
 
void get_certification_info (std::map< std::string, std::string > *cert_info) override
 Retrieves the current certification info. More...
 
bool get_certification_info_recovery_metadata (Recovery_metadata_message *recovery_metadata_message) override
 Retrieves the current certification info. More...
 
int set_certification_info (std::map< std::string, std::string > *cert_info) override
 Sets the certification info according to the given value. More...
 
bool set_certification_info_recovery_metadata (Recovery_metadata_message *recovery_metadata_message) override
 The received certification info from Recovery Metadata is decoded, compressed and added to the member certification info for certification. More...
 
bool initialize_server_gtid_set_after_distributed_recovery () override
 Initializes the gtid_executed set. More...
 
ulonglong get_positive_certified () override
 Get the number of postively certified transactions by the certifier. More...
 
ulonglong get_negative_certified () override
 Get method to retrieve the number of negatively certified transactions. More...
 
ulonglong get_certification_info_size () override
 Get method to retrieve the certification db size. More...
 
void get_last_conflict_free_transaction (std::string *value) override
 Get method to retrieve the last conflict free transaction. More...
 
std::pair< Gtid, mysql::utils::Return_statusgenerate_view_change_group_gtid ()
 Generate group GTID for a view change log event. More...
 
int add_gtid_to_group_gtid_executed (const Gtid &gtid)
 Public method to add the given GTID value in the group_gtid_executed set which is used to support skip gtid functionality. More...
 
void enable_conflict_detection () override
 Enables conflict detection. More...
 
void disable_conflict_detection () override
 Disables conflict detection. More...
 
bool is_conflict_detection_enable () override
 Check if conflict detection is enable. More...
 
void gtid_intervals_computation ()
 Compute GTID intervals. More...
 
void garbage_collect (Gtid_set *executed_gtid_set=nullptr, bool on_member_join=false) override
 Validates if garbage collect should run against the intersection of the received transactions stable sets. More...
 
- Public Member Functions inherited from Certifier_interface
 ~Certifier_interface () override=default
 
- Public Member Functions inherited from Certifier_stats
virtual ~Certifier_stats ()=default
 

Static Public Attributes

static const std::string CERTIFICATION_INFO_ERROR_NAME
 Key used to store errors in the certification info on View_change_log_event. More...
 

Private Types

enum  enum_update_status { STABLE_SET_UPDATED , STABLE_SET_ALREADY_CONTAINED , STABLE_SET_ERROR }
 

Private Member Functions

int initialize_server_gtid_set (bool get_server_gtid_retrieved=false)
 Method to initialize the group_gtid_executed gtid set with the server gtid executed set and applier retrieved gtid set values. More...
 
void update_parallel_applier_indexes (bool update_parallel_applier_last_committed_global, bool increment_parallel_applier_sequence_number)
 This function updates parallel applier indexes. More...
 
void add_to_group_gtid_executed_internal (rpl_sidno sidno, rpl_gno gno)
 Internal method to add the given gtid gno in the group_gtid_executed set. More...
 
const Gtid_setget_group_gtid_set () const
 Returns group_executed_gtid_set or group_extracted_gtid_set while certifying already applied transactions from the donor. More...
 
Gtid_setget_group_gtid_set ()
 Returns group_executed_gtid_set or group_extracted_gtid_set while certifying already applied transactions from the donor. More...
 
std::tuple< rpl_sidno, rpl_sidno, rpl_sidno, mysql::utils::Return_statusextract_sidno (Gtid_log_event &gle, bool is_gtid_specified, Gtid_set &snapshot_gtid_set, Gtid_set &group_gtid_set)
 This function determines three sidnos for a specific TSID based on information obtained from the Gtid_log_event. More...
 
gr::Certified_gtid end_certification_result (const rpl_sidno &gtid_server_sidno, const rpl_sidno &gtid_group_sidno, const rpl_gno &generated_gno, bool is_gtid_specified, bool local_transaction, const gr::Certification_result &certification_result)
 Internal helper method for ending certification, determination of final GTID values after certification according to certification result. More...
 
gr::Certification_result add_writeset_to_certification_info (int64 &transaction_last_committed, Gtid_set *snapshot_version, std::list< const char * > *write_set, bool local_transaction)
 Adds the transaction's write set to certification info. More...
 
void update_transaction_dependency_timestamps (Gtid_log_event &gle, bool has_write_set, bool has_write_set_large_size, int64 transaction_last_committed)
 Updates parallel applier indexes in GLE. More...
 
bool is_initialized ()
 
bool compress_packet (ProtoCertificationInformationMap &cert_info, unsigned char **uncompresssed_buffer, std::vector< GR_compress * > &compressor_list, GR_compress::enum_compression_type compression_type)
 This shall serialize the certification info stored in protobuf map format, and then compress provided serialized string. More...
 
bool set_certification_info_part (GR_compress::enum_compression_type compression_type, const unsigned char *buffer, unsigned long long buffer_length, unsigned long long uncompressed_buffer_length)
 Sets the certification info according to the given value. More...
 
void clear_certification_info ()
 Empties certification info. More...
 
void clear_members ()
 Method to clear the members. More...
 
bool add_item (const char *item, Gtid_set_ref *snapshot_version, int64 *item_previous_sequence_number)
 Adds an item from transaction writeset to the certification DB. More...
 
Gtid_setget_certified_write_set_snapshot_version (const char *item)
 Find the snapshot_version corresponding to an item. More...
 
void clear_incoming ()
 Clear incoming queue. More...
 
void update_certified_transaction_count (bool result, bool local_transaction)
 
void garbage_collect_internal (Gtid_set *intersection_gtid_set, bool preemptive=false)
 Removes the intersection of the received transactions stable sets from certification database. More...
 
bool intersect_members_gtid_executed_and_garbage_collect ()
 Computes intersection between all sets received, so that we have the already applied transactions on all servers. More...
 
enum enum_update_status update_stable_set (const Gtid_set &set)
 Update stable set with set if not already contained. More...
 

Private Attributes

std::atomic< bool > initialized {false}
 Is certifier initialized. More...
 
rpl_sidno group_gtid_tsid_map_group_sidno
 Variable to store the sidno used for transactions which will be logged with the group_uuid. More...
 
rpl_sidno views_sidno_group_representation
 The sidno used for view log events as seen by the group sid map. More...
 
rpl_sidno views_sidno_server_representation
 The sidno used for view log events as seen by the server sid map. More...
 
Gtid last_conflict_free_transaction
 Last conflict free transaction identification. More...
 
Certification_info certification_info
 Certification database. More...
 
Tsid_mapcertification_info_tsid_map
 
ulonglong positive_cert
 
ulonglong negative_cert
 
int64 parallel_applier_last_committed_global
 
int64 parallel_applier_last_sequence_number
 
int64 parallel_applier_sequence_number
 
bool certifier_garbage_collection_block
 
bool same_member_message_discarded
 
mysql_mutex_t LOCK_certification_info
 
Checkable_rwlockstable_gtid_set_lock
 Stable set and garbage collector variables. More...
 
Tsid_mapstable_tsid_map
 
Gtid_setstable_gtid_set
 
Synchronized_queue< Data_packet * > * incoming
 
std::vector< std::string > members
 
bool certifying_already_applied_transactions
 
Tsid_mapgroup_gtid_tsid_map
 
Gtid_setgroup_gtid_executed
 
Gtid_setgroup_gtid_extracted
 A Gtid_set which contains the gtid extracted from the certification info map of the donor. More...
 
gr::Gtid_generator gtid_generator
 Object responsible for generation of the GTIDs for transactions with gtid_next equal to AUTOMATIC (tagged/untagged) More...
 
bool conflict_detection_enable
 Conflict detection is performed when: 1) group is on multi-master mode; 2) group is on single-primary mode and primary is applying relay logs with transactions from a previous primary. More...
 
mysql_mutex_t LOCK_members
 
Certifier_broadcast_threadbroadcast_thread
 Broadcast thread. More...
 
bool is_first_remote_transaction_certified {true}
 

Static Private Attributes

static const std::string GTID_EXTRACTED_NAME = "gtid_extracted"
 Key used to store group_gtid_executed on certification info on View_change_log_event. More...
 

Member Typedef Documentation

◆ Certification_info

typedef std::unordered_map< std::string, Gtid_set_ref *, std::hash<std::string>, std::equal_to<std::string>, Malloc_allocator<std::pair<const std::string, Gtid_set_ref *> > > Certifier::Certification_info

◆ ProtoCertificationInformationMap

Member Enumeration Documentation

◆ enum_update_status

Enumerator
STABLE_SET_UPDATED 
STABLE_SET_ALREADY_CONTAINED 
STABLE_SET_ERROR 

Constructor & Destructor Documentation

◆ Certifier()

Certifier::Certifier ( )

◆ ~Certifier()

Certifier::~Certifier ( )
override

Member Function Documentation

◆ add_gtid_to_group_gtid_executed()

int Certifier::add_gtid_to_group_gtid_executed ( const Gtid gtid)

Public method to add the given GTID value in the group_gtid_executed set which is used to support skip gtid functionality.

Parameters
[in]gtidGTID to be added
Return values
1error during addition.
0success.

◆ add_item()

bool Certifier::add_item ( const char *  item,
Gtid_set_ref snapshot_version,
int64 item_previous_sequence_number 
)
private

Adds an item from transaction writeset to the certification DB.

Parameters
[in]itemitem in the writeset to be added to the Certification DB.
[in]snapshot_versionSnapshot version of the incoming transaction which modified the above mentioned item.
[out]item_previous_sequence_numberThe previous parallel applier sequence number for this item.
Return values
Falsesuccessfully added to the map. True otherwise.

◆ add_to_group_gtid_executed_internal()

void Certifier::add_to_group_gtid_executed_internal ( rpl_sidno  sidno,
rpl_gno  gno 
)
private

Internal method to add the given gtid gno in the group_gtid_executed set.

This will be used in the skip gtid implementation.

Note
this will update the last know local transaction GTID.
Parameters
[in]sidnorpl_sidno part of the executing gtid of the ongoing transaction.
[in]gnorpl_gno part of the executing gtid of the ongoing transaction.

◆ add_writeset_to_certification_info()

Certification_result Certifier::add_writeset_to_certification_info ( int64 transaction_last_committed,
Gtid_set snapshot_version,
std::list< const char * > *  write_set,
bool  local_transaction 
)
private

Adds the transaction's write set to certification info.

Parameters
[out]transaction_last_committedThe transaction's logical timestamps used for MTS
[in,out]snapshot_versionThe incoming transaction snapshot version.
[in,out]write_setThe incoming transaction write set.
[in]local_transactionTrue in case this transaction originates from the this server

◆ certify()

Certified_gtid Certifier::certify ( Gtid_set snapshot_version,
std::list< const char * > *  write_set,
bool  is_gtid_specified,
const char *  member_uuid,
Gtid_log_event gle,
bool  local_transaction 
)

This member function SHALL certify the set of items against transactions that have already passed the certification test.

Parameters
snapshot_versionThe incoming transaction snapshot version.
write_setThe incoming transaction write set.
is_gtid_specifiedTrue in case GTID is specified for this trx
member_uuidThe UUID of the member from which this transaction originates.
gleThe incoming transaction global identifier event.
local_transactionTrue if this transaction did originate from this member, false otherwise.
Return values
>0transaction identifier (positively certified). If generate_group_id is false and certification positive a 1 is returned;
0negatively certified;
-1error.

◆ clear_certification_info()

void Certifier::clear_certification_info ( )
private

Empties certification info.

◆ clear_incoming()

void Certifier::clear_incoming ( )
private

Clear incoming queue.

◆ clear_members()

void Certifier::clear_members ( )
private

Method to clear the members.

◆ compress_packet()

bool Certifier::compress_packet ( ProtoCertificationInformationMap cert_info,
unsigned char **  uncompresssed_buffer,
std::vector< GR_compress * > &  compressor_list,
GR_compress::enum_compression_type  compression_type 
)
private

This shall serialize the certification info stored in protobuf map format, and then compress provided serialized string.

The compressed payload is stored into multiple buffer containers of the output list.

Parameters
[in]cert_infothe certification info stored in protobuf map.
[out]uncompresssed_bufferthe buffer for uncompressed data.
[out]compressor_listthe certification info in compressed form splitted into multiple container of list.
[in]compression_typethe type of compression used
Returns
the operation status
Return values
falseOK
trueError

◆ disable_conflict_detection()

void Certifier::disable_conflict_detection ( )
overridevirtual

Disables conflict detection.

Implements Certifier_interface.

◆ enable_conflict_detection()

void Certifier::enable_conflict_detection ( )
overridevirtual

Enables conflict detection.

Implements Certifier_interface.

◆ end_certification_result()

Certified_gtid Certifier::end_certification_result ( const rpl_sidno gtid_server_sidno,
const rpl_sidno gtid_group_sidno,
const rpl_gno generated_gno,
bool  is_gtid_specified,
bool  local_transaction,
const gr::Certification_result certification_result 
)
private

Internal helper method for ending certification, determination of final GTID values after certification according to certification result.

Parameters
[in]gtid_server_sidnoSIDNO for transaction GTID as represented in the server (global sid map)
[in]gtid_group_sidnoSIDNO for transaction GTID as represented in the group
[in]generated_gnoGNO generated for the transaction
[in]is_gtid_specifiedTrue if GTID was specified
[in]local_transactionTrue in case this transaction originates from the this server
[in]certification_resultDetermined certification result

◆ extract_sidno()

std::tuple< rpl_sidno, rpl_sidno, rpl_sidno, mysql::utils::Return_status > Certifier::extract_sidno ( Gtid_log_event gle,
bool  is_gtid_specified,
Gtid_set snapshot_gtid_set,
Gtid_set group_gtid_set 
)
private

This function determines three sidnos for a specific TSID based on information obtained from the Gtid_log_event.

Parameters
gleGtid_log_event from which tsid will be extracted
is_gtid_specifiedTrue in case GTID is specified
snapshot_gtid_setSnapshot GTIDs
group_gtid_setCurrent GTID set
Returns
A tuple of:
  • group_sidno Sidno relative to the group sid map
  • gtid_snapshot_sidno Sidno relative to the snapshot sid map
  • gtid_global_sidno Sidno relative to the global sid map
  • return status

We need to ensure that group sidno does exist on snapshot version due to the following scenario: 1) Member joins the group. 2) Goes through recovery procedure, view change is queued to apply, member is marked ONLINE. This requires –group_replication_recovery_complete_at=TRANSACTIONS_CERTIFIED to happen. 3) Despite the view change log event is still being applied, since the member is already ONLINE it can execute transactions. The first transaction from this member will not include any group GTID, since no group transaction is yet applied. 4) As a result of this sequence snapshot_version will not contain any group GTID and the below instruction snapshot_version->_add_gtid(group_sidno, result); would fail because of that

◆ garbage_collect()

void Certifier::garbage_collect ( Gtid_set executed_gtid_set = nullptr,
bool  on_member_join = false 
)
overridevirtual

Validates if garbage collect should run against the intersection of the received transactions stable sets.

Parameters
executed_gtid_setintersection gtid set
on_member_joincall due to member joining

Implements Certifier_interface.

◆ garbage_collect_internal()

void Certifier::garbage_collect_internal ( Gtid_set intersection_gtid_set,
bool  preemptive = false 
)
private

Removes the intersection of the received transactions stable sets from certification database.

Parameters
intersection_gtid_setintersection gtid set
preemptiveis a preemptive run

◆ generate_view_change_group_gtid()

std::pair< Gtid, mysql::utils::Return_status > Certifier::generate_view_change_group_gtid ( )

Generate group GTID for a view change log event.

Returns
Generated gtid and Gtid generation result
See also
Return_status

◆ get_certification_info()

void Certifier::get_certification_info ( std::map< std::string, std::string > *  cert_info)
overridevirtual

Retrieves the current certification info.

Note
if concurrent access is introduce to these variables, locking is needed in this method
Parameters
[out]cert_infoa pointer to retrieve the certification info

Implements Certifier_interface.

◆ get_certification_info_recovery_metadata()

bool Certifier::get_certification_info_recovery_metadata ( Recovery_metadata_message recovery_metadata_message)
overridevirtual

Retrieves the current certification info.

Note
if concurrent access is introduce to these variables, locking is needed in this method
Parameters
[out]recovery_metadata_messageRetrieves the metadata message
Returns
the operation status
Return values
falseOK
trueError

Implements Certifier_interface.

◆ get_certification_info_size()

ulonglong Certifier::get_certification_info_size ( )
overridevirtual

Get method to retrieve the certification db size.

Implements Certifier_interface.

◆ get_certified_write_set_snapshot_version()

Gtid_set * Certifier::get_certified_write_set_snapshot_version ( const char *  item)
private

Find the snapshot_version corresponding to an item.

Return if it exists, other wise return NULL;

Parameters
[in]itemitem for the snapshot version.
Return values
Gtid_setpointer if exists in the map. Otherwise 0;

◆ get_group_gtid_set() [1/2]

Gtid_set * Certifier::get_group_gtid_set ( )
private

Returns group_executed_gtid_set or group_extracted_gtid_set while certifying already applied transactions from the donor.

Returns
Pointer to the 'correct' group_gtid_set

◆ get_group_gtid_set() [2/2]

const Gtid_set * Certifier::get_group_gtid_set ( ) const
private

Returns group_executed_gtid_set or group_extracted_gtid_set while certifying already applied transactions from the donor.

Returns
Pointer to the 'correct' group_gtid_set

◆ get_group_stable_transactions_set_string()

int Certifier::get_group_stable_transactions_set_string ( char **  buffer,
size_t *  length 
)
overridevirtual

Returns the transactions in stable set in text format, that is, the set of transactions already applied on all group members.

Parameters
[out]bufferPointer to pointer to string. The method will set it to point to the newly allocated buffer, or NULL on out of memory. Caller must free the allocated memory.
[out]lengthLength of the generated string.
Returns
the operation status
Return values
0OK
!=0Out of memory error

Implements Certifier_stats.

◆ get_last_conflict_free_transaction()

void Certifier::get_last_conflict_free_transaction ( std::string *  value)
overridevirtual

Get method to retrieve the last conflict free transaction.

Parameters
[out]valueThe last conflict free transaction

Implements Certifier_stats.

◆ get_negative_certified()

ulonglong Certifier::get_negative_certified ( )
overridevirtual

Get method to retrieve the number of negatively certified transactions.

Implements Certifier_stats.

◆ get_positive_certified()

ulonglong Certifier::get_positive_certified ( )
overridevirtual

Get the number of postively certified transactions by the certifier.

Implements Certifier_stats.

◆ gtid_intervals_computation()

void Certifier::gtid_intervals_computation ( )

Compute GTID intervals.

◆ handle_certifier_data()

int Certifier::handle_certifier_data ( const uchar data,
ulong  len,
const Gcs_member_identifier gcs_member_id 
)
overridevirtual

Queues the packet coming from the reader for future processing.

Parameters
[in]datathe packet data
[in]lenthe packet length
[in]gcs_member_idthe member_id which sent the message
Returns
the operation status
Return values
0OK
!=0Error on queue

Implements Certifier_interface.

◆ handle_view_change()

void Certifier::handle_view_change ( )
overridevirtual

Handle view changes on certifier.

Implements Certifier_interface.

◆ initialize()

int Certifier::initialize ( ulonglong  gtid_assignment_block_size)

Initialize certifier.

Parameters
gtid_assignment_block_sizethe group gtid assignment block size
Returns
the operation status
Return values
0OK
!=0Error

◆ initialize_server_gtid_set()

int Certifier::initialize_server_gtid_set ( bool  get_server_gtid_retrieved = false)
private

Method to initialize the group_gtid_executed gtid set with the server gtid executed set and applier retrieved gtid set values.

Parameters
get_server_gtid_retrievedadd applier retrieved gtid set to group_gtid_executed gtid set
Return values
1error during initialization
0success

◆ initialize_server_gtid_set_after_distributed_recovery()

bool Certifier::initialize_server_gtid_set_after_distributed_recovery ( )
overridevirtual

Initializes the gtid_executed set.

Returns
the operation status
Return values
falseOK
trueError

Implements Certifier_interface.

◆ intersect_members_gtid_executed_and_garbage_collect()

bool Certifier::intersect_members_gtid_executed_and_garbage_collect ( )
private

Computes intersection between all sets received, so that we have the already applied transactions on all servers.

Returns
the operation status
Return values
falseit did not run garbage_collect
trueit did run garbage_collect

◆ is_conflict_detection_enable()

bool Certifier::is_conflict_detection_enable ( )
overridevirtual

Check if conflict detection is enable.

Return values
Trueconflict detection is enable
Falseotherwise

Implements Certifier_interface.

◆ is_initialized()

bool Certifier::is_initialized ( )
inlineprivate

◆ set_certification_info()

int Certifier::set_certification_info ( std::map< std::string, std::string > *  cert_info)
overridevirtual

Sets the certification info according to the given value.

Note
if concurrent access is introduce to these variables, locking is needed in this method
Parameters
[in]cert_infocertification info retrieved from recovery procedure
Return values
>0 Error during setting certification info.
=0 Everything went fine.

Implements Certifier_interface.

◆ set_certification_info_part()

bool Certifier::set_certification_info_part ( GR_compress::enum_compression_type  compression_type,
const unsigned char *  buffer,
unsigned long long  buffer_length,
unsigned long long  uncompressed_buffer_length 
)
private

Sets the certification info according to the given value.

This shall uncompress and then convert uncompressed string into the protobuf map format storing certification info. This certification info is added to certifier's certification info.

Note
if concurrent access is introduce to these variables, locking is needed in this method
Parameters
[in]compression_typethe compression type
[in]bufferthe compressed certification info retrieved from recovery procedure.
[in]buffer_lengththe size of the compressed retrieved certification info.
[in]uncompressed_buffer_lengththe size of the uncompressed certification info before it was compressed.
Returns
the operation status
Return values
falseOK
trueError

◆ set_certification_info_recovery_metadata()

bool Certifier::set_certification_info_recovery_metadata ( Recovery_metadata_message recovery_metadata_message)
overridevirtual

The received certification info from Recovery Metadata is decoded, compressed and added to the member certification info for certification.

Note
if concurrent access is introduce to these variables, locking is needed in this method
Parameters
[in]recovery_metadata_messagethe pointer to Recovery_metadata_message.
Returns
the operation status
Return values
falseOK
trueError

Implements Certifier_interface.

◆ terminate()

int Certifier::terminate ( )

Terminate certifier.

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

◆ update_certified_transaction_count()

void Certifier::update_certified_transaction_count ( bool  result,
bool  local_transaction 
)
private

◆ update_parallel_applier_indexes()

void Certifier::update_parallel_applier_indexes ( bool  update_parallel_applier_last_committed_global,
bool  increment_parallel_applier_sequence_number 
)
private

This function updates parallel applier indexes.

It must be called for each remote transaction.

Parameters
[in]update_parallel_applier_last_committed_globalIf true parallel_applier_last_committed_global is updated to the current sequence number (before update sequence number).
[in]increment_parallel_applier_sequence_numberIf false (during certification garbage collection) parallel_applier_last_committed_global is set to parallel_applier_last_sequence_number and parallel_applier_last_sequence_number is not updated

Note: parallel_applier_last_committed_global should be updated on the following situations: 1) Transaction without write set is certified, since it represents the lowest last_committed for all future transactions; 2) After certification info garbage collection, since we do not know what write sets were purged, which may cause transactions last committed to be incorrectly computed.

◆ update_stable_set()

Certifier::enum_update_status Certifier::update_stable_set ( const Gtid_set set)
private

Update stable set with set if not already contained.

Parameters
setGtid to add to stable set
Returns
status of operation

◆ update_transaction_dependency_timestamps()

void Certifier::update_transaction_dependency_timestamps ( Gtid_log_event gle,
bool  has_write_set,
bool  has_write_set_large_size,
int64  transaction_last_committed 
)
private

Updates parallel applier indexes in GLE.

Parameters
gleGle currently processed
has_write_setTrue in case transaction write set is not empty
has_write_set_large_sizeTrue in case number of write sets in transactions is greater than group_replication_preemptive_garbage_collection_rows_threshold
transaction_last_committedThe transaction's logical timestamps used for MTS

Member Data Documentation

◆ broadcast_thread

Certifier_broadcast_thread* Certifier::broadcast_thread
private

Broadcast thread.

◆ certification_info

Certification_info Certifier::certification_info
private

Certification database.

◆ CERTIFICATION_INFO_ERROR_NAME

const std::string Certifier::CERTIFICATION_INFO_ERROR_NAME
static
Initial value:
=
"certification_info_error"

Key used to store errors in the certification info on View_change_log_event.

◆ certification_info_tsid_map

Tsid_map* Certifier::certification_info_tsid_map
private

◆ certifier_garbage_collection_block

bool Certifier::certifier_garbage_collection_block
private

◆ certifying_already_applied_transactions

bool Certifier::certifying_already_applied_transactions
private

◆ conflict_detection_enable

bool Certifier::conflict_detection_enable
private

Conflict detection is performed when: 1) group is on multi-master mode; 2) group is on single-primary mode and primary is applying relay logs with transactions from a previous primary.

◆ group_gtid_executed

Gtid_set* Certifier::group_gtid_executed
private

◆ group_gtid_extracted

Gtid_set* Certifier::group_gtid_extracted
private

A Gtid_set which contains the gtid extracted from the certification info map of the donor.

It is the set of transactions that is executed at the time of View_change_log_event at donor.

◆ group_gtid_tsid_map

Tsid_map* Certifier::group_gtid_tsid_map
private

◆ group_gtid_tsid_map_group_sidno

rpl_sidno Certifier::group_gtid_tsid_map_group_sidno
private

Variable to store the sidno used for transactions which will be logged with the group_uuid.

◆ GTID_EXTRACTED_NAME

const std::string Certifier::GTID_EXTRACTED_NAME = "gtid_extracted"
staticprivate

Key used to store group_gtid_executed on certification info on View_change_log_event.

◆ gtid_generator

gr::Gtid_generator Certifier::gtid_generator
private

Object responsible for generation of the GTIDs for transactions with gtid_next equal to AUTOMATIC (tagged/untagged)

◆ incoming

Synchronized_queue<Data_packet *>* Certifier::incoming
private

◆ initialized

std::atomic<bool> Certifier::initialized {false}
private

Is certifier initialized.

◆ is_first_remote_transaction_certified

bool Certifier::is_first_remote_transaction_certified {true}
private

◆ last_conflict_free_transaction

Gtid Certifier::last_conflict_free_transaction
private

Last conflict free transaction identification.

◆ LOCK_certification_info

mysql_mutex_t Certifier::LOCK_certification_info
private

◆ LOCK_members

mysql_mutex_t Certifier::LOCK_members
private

◆ members

std::vector<std::string> Certifier::members
private

◆ negative_cert

ulonglong Certifier::negative_cert
private

◆ parallel_applier_last_committed_global

int64 Certifier::parallel_applier_last_committed_global
private

◆ parallel_applier_last_sequence_number

int64 Certifier::parallel_applier_last_sequence_number
private

◆ parallel_applier_sequence_number

int64 Certifier::parallel_applier_sequence_number
private

◆ positive_cert

ulonglong Certifier::positive_cert
private

◆ same_member_message_discarded

bool Certifier::same_member_message_discarded
private

◆ stable_gtid_set

Gtid_set* Certifier::stable_gtid_set
private

◆ stable_gtid_set_lock

Checkable_rwlock* Certifier::stable_gtid_set_lock
private

Stable set and garbage collector variables.

◆ stable_tsid_map

Tsid_map* Certifier::stable_tsid_map
private

◆ views_sidno_group_representation

rpl_sidno Certifier::views_sidno_group_representation
private

The sidno used for view log events as seen by the group sid map.

◆ views_sidno_server_representation

rpl_sidno Certifier::views_sidno_server_representation
private

The sidno used for view log events as seen by the server sid map.


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