MySQL 9.0.0
Source Code Documentation
Group_member_info Class Reference

#include <member_info.h>

Inheritance diagram for Group_member_info:
[legend]

Public Types

enum  enum_payload_item_type {
  PIT_UNKNOWN = 0 , PIT_HOSTNAME = 1 , PIT_PORT = 2 , PIT_UUID = 3 ,
  PIT_GCS_ID = 4 , PIT_STATUS = 5 , PIT_VERSION = 6 , PIT_WRITE_SET_EXTRACTION_ALGORITHM = 7 ,
  PIT_EXECUTED_GTID = 8 , PIT_RETRIEVED_GTID = 9 , PIT_GTID_ASSIGNMENT_BLOCK_SIZE = 10 , PIT_MEMBER_ROLE = 11 ,
  PIT_CONFIGURATION_FLAGS = 12 , PIT_CONFLICT_DETECTION_ENABLE = 13 , PIT_MEMBER_WEIGHT = 14 , PIT_LOWER_CASE_TABLE_NAME = 15 ,
  PIT_GROUP_ACTION_RUNNING = 16 , PIT_PRIMARY_ELECTION_RUNNING = 17 , PIT_DEFAULT_TABLE_ENCRYPTION = 18 , PIT_PURGED_GTID = 19 ,
  PIT_RECOVERY_ENDPOINTS = 20 , PIT_VIEW_CHANGE_UUID = 21 , PIT_ALLOW_SINGLE_LEADER = 22 , PIT_GROUP_ACTION_RUNNING_NAME = 23 ,
  PIT_GROUP_ACTION_RUNNING_DESCRIPTION = 24 , PIT_PREEMPTIVE_GARBAGE_COLLECTION = 25 , PIT_MAX = 26
}
 
enum  Group_member_status {
  MEMBER_ONLINE = 1 , MEMBER_OFFLINE , MEMBER_IN_RECOVERY , MEMBER_ERROR ,
  MEMBER_UNREACHABLE , MEMBER_END
}
 
enum  Group_member_role { MEMBER_ROLE_PRIMARY = 1 , MEMBER_ROLE_SECONDARY , MEMBER_ROLE_END }
 
enum  enum_transaction_write_set_hashing_algorithm_compatibility { HASH_ALGORITHM_OFF = 0 , HASH_ALGORITHM_MURMUR32 = 1 , HASH_ALGORITHM_XXHASH64 = 2 }
 
- Public Types inherited from Plugin_gcs_message
enum  enum_cargo_type {
  CT_UNKNOWN = 0 , CT_CERTIFICATION_MESSAGE = 1 , CT_TRANSACTION_MESSAGE = 2 , CT_RECOVERY_MESSAGE = 3 ,
  CT_MEMBER_INFO_MESSAGE = 4 , CT_MEMBER_INFO_MANAGER_MESSAGE = 5 , CT_PIPELINE_STATS_MEMBER_MESSAGE = 6 , CT_SINGLE_PRIMARY_MESSAGE = 7 ,
  CT_GROUP_ACTION_MESSAGE = 8 , CT_GROUP_VALIDATION_MESSAGE = 9 , CT_SYNC_BEFORE_EXECUTION_MESSAGE = 10 , CT_TRANSACTION_WITH_GUARANTEE_MESSAGE = 11 ,
  CT_TRANSACTION_PREPARED_MESSAGE = 12 , CT_MESSAGE_SERVICE_MESSAGE = 13 , CT_RECOVERY_METADATA_MESSAGE = 14 , CT_MAX = 15
}
 The different cargo type codes. More...
 

Public Member Functions

void * operator new (size_t size, const std::nothrow_t &) noexcept
 
void operator delete (void *ptr, const std::nothrow_t &) noexcept
 
void * operator new (size_t size) noexcept
 Allocate memory on the heap with instrumented memory allocation, so that memory consumption can be tracked. More...
 
void operator delete (void *ptr) noexcept
 Deallocate memory on the heap with instrumented memory allocation, so that memory consumption can be tracked. More...
 
 Group_member_info (PSI_mutex_key psi_mutex_key_arg=key_GR_LOCK_group_member_info_update_lock)
 Group_member_info empty constructor. More...
 
 Group_member_info (const char *hostname_arg, uint port_arg, const char *uuid_arg, int write_set_extraction_algorithm, const std::string &gcs_member_id_arg, Group_member_info::Group_member_status status_arg, Member_version &member_version_arg, ulonglong gtid_assignment_block_size_arg, Group_member_info::Group_member_role role_arg, bool in_single_primary_mode, bool has_enforces_update_everywhere_checks, uint member_weight_arg, uint lower_case_table_names_arg, bool default_table_encryption_arg, const char *recovery_endpoints_arg, const char *view_change_uuid_arg, bool allow_single_leader, bool preemptive_garbage_collection, PSI_mutex_key psi_mutex_key_arg=key_GR_LOCK_group_member_info_update_lock)
 Group_member_info constructor. More...
 
 Group_member_info (Group_member_info &other)
 Copy constructor. More...
 
 Group_member_info (const uchar *data, size_t len, PSI_mutex_key psi_mutex_key_arg=key_GR_LOCK_group_member_info_update_lock)
 Group_member_info raw data constructor. More...
 
 ~Group_member_info () override
 Destructor. More...
 
void update (const char *hostname_arg, uint port_arg, const char *uuid_arg, int write_set_extraction_algorithm, const std::string &gcs_member_id_arg, Group_member_info::Group_member_status status_arg, Member_version &member_version_arg, ulonglong gtid_assignment_block_size_arg, Group_member_info::Group_member_role role_arg, bool in_single_primary_mode, bool has_enforces_update_everywhere_checks, uint member_weight_arg, uint lower_case_table_names_arg, bool default_table_encryption_arg, const char *recovery_endpoints_arg, const char *view_change_uuid_arg, bool allow_single_leader, bool preemptive_garbage_collection)
 Update Group_member_info. More...
 
void update (Group_member_info &other)
 Update Group_member_info. More...
 
std::string get_hostname ()
 
uint get_port ()
 
std::string get_uuid ()
 
Gcs_member_identifier get_gcs_member_id ()
 
Group_member_status get_recovery_status ()
 
Group_member_role get_role ()
 
const char * get_member_role_string ()
 
Member_version get_member_version ()
 
std::string get_gtid_executed ()
 
std::string get_gtid_purged ()
 
std::string get_gtid_retrieved ()
 
uint get_write_set_extraction_algorithm ()
 
const char * get_write_set_extraction_algorithm_name ()
 
ulonglong get_gtid_assignment_block_size ()
 
uint32 get_configuration_flags ()
 
void set_primary_mode_flag (bool in_primary_mode)
 Set the primary flag. More...
 
void set_enforces_update_everywhere_checks_flag (bool enforce_everywhere_checks)
 Set the enforces_update_everywhere_checks flag. More...
 
uint get_lower_case_table_names ()
 
bool get_default_table_encryption ()
 
bool in_primary_mode ()
 
bool has_enforces_update_everywhere_checks ()
 
void update_recovery_status (Group_member_status new_status)
 Updates this object recovery status. More...
 
void update_gtid_sets (std::string &executed_gtids, std::string &purged_gtids, std::string &retrieve_gtids)
 Updates this object GTID sets. More...
 
void set_role (Group_member_role new_role)
 Updates this object member role. More...
 
bool has_greater_version (Group_member_info *other)
 Return true if member version is higher than other member version. More...
 
bool has_lower_uuid (Group_member_info *other)
 Return true if server uuid is lower than other member server uuid. More...
 
bool has_greater_weight (Group_member_info *other)
 Return true if member weight is higher than other member weight. More...
 
bool operator== (Group_member_info &other)
 Redefinition of operate ==, which operate upon the uuid. More...
 
void set_unreachable ()
 Sets this member as unreachable. More...
 
void set_reachable ()
 Sets this member as reachable. More...
 
bool is_unreachable ()
 Return true if this has been flagged as unreachable. More...
 
void enable_conflict_detection ()
 Update this member conflict detection to true. More...
 
void disable_conflict_detection ()
 Update this member conflict detection to false. More...
 
bool is_conflict_detection_enabled ()
 Return true if conflict detection is enable on this member. More...
 
void set_member_weight (uint new_member_weight)
 Update member weight. More...
 
uint get_member_weight ()
 Return member weight. More...
 
bool is_group_action_running ()
 
void set_is_group_action_running (bool is_running)
 Sets if the member is currently running a group action. More...
 
bool is_primary_election_running ()
 
void set_is_primary_election_running (bool is_running)
 Sets if the member is currently running a primary election. More...
 
std::string get_recovery_endpoints ()
 List of member advertised recovery endpoints. More...
 
void set_recovery_endpoints (const char *endpoints)
 Save list of member advertised recovery endpoints. More...
 
std::string get_view_change_uuid ()
 Get UID used when logging view change events. More...
 
bool get_allow_single_leader ()
 
const std::string & get_group_action_running_name ()
 Get group action name if running on the member. More...
 
void set_group_action_running_name (const std::string &group_action_running_name)
 Set group action name if running on the member. More...
 
const std::string & get_group_action_running_description ()
 Get group action description if running on the member. More...
 
void set_group_action_running_description (const std::string &group_action_running_description)
 Set group action description if running on the member. More...
 
void set_view_change_uuid (const char *view_change_cnf)
 Save member view change uuid. More...
 
bool get_preemptive_garbage_collection ()
 Get the value of 'group_replication_preemptive_garbage_collection' option on this member. More...
 
- Public Member Functions inherited from Plugin_gcs_message
virtual ~Plugin_gcs_message ()=default
 
int get_version ()
 
unsigned short get_header_length ()
 
enum_cargo_type get_cargo_type () const
 
unsigned long long get_msg_length ()
 
void encode (std::vector< unsigned char > *buffer) const
 Encodes the contents of this instance into the buffer. More...
 
void decode (const unsigned char *buffer, size_t length)
 Decodes the contents of the buffer and sets the field values according to the values decoded. More...
 

Static Public Member Functions

static const char * get_member_status_string (Group_member_status status)
 
static const char * get_configuration_flag_string (const uint32 configuation_flag)
 
static std::string get_configuration_flags_string (const uint32 configuation_flags)
 
static bool comparator_group_member_version (Group_member_info *m1, Group_member_info *m2)
 
static bool comparator_group_member_uuid (Group_member_info *m1, Group_member_info *m2)
 
static bool comparator_group_member_weight (Group_member_info *m1, Group_member_info *m2)
 
- Static Public Member Functions inherited from Plugin_gcs_message
static enum_cargo_type get_cargo_type (const unsigned char *buffer)
 Return the cargo type of a given message buffer, without decode the complete message. More...
 
static void get_first_payload_item_raw_data (const unsigned char *buffer, const unsigned char **payload_item_data, size_t *payload_item_length)
 Return the raw data of the first payload item of a given message buffer, without decode the complete message. More...
 
static bool get_payload_item_type_raw_data (const unsigned char *buffer, const unsigned char *end, uint16 payload_item_type, const unsigned char **payload_item_data, unsigned long long *payload_item_length)
 Return the raw data of the payload item of a given payload type of a given message buffer. More...
 

Public Attributes

bool skip_encode_default_table_encryption
 
bool m_skip_encode_view_change_uuid
 
PSI_mutex_key psi_mutex_key
 

Protected Member Functions

void encode_payload (std::vector< unsigned char > *buffer) const override
 Encodes the contents of this instance payload into the buffer. More...
 
void decode_payload (const unsigned char *buffer, const unsigned char *) override
 Decodes the contents of the buffer and sets the payload field values according to the values decoded. More...
 
- Protected Member Functions inherited from Plugin_gcs_message
 Plugin_gcs_message (enum_cargo_type cargo_type)
 Plugin_gcs_message constructor. More...
 
void encode_header (std::vector< unsigned char > *buffer) const
 Encodes the header of this instance into the buffer. More...
 
void decode_header (const unsigned char **slider)
 Decodes the header of the buffer into this instance. More...
 
void encode_payload_item_type_and_length (std::vector< unsigned char > *buffer, uint16 payload_item_type, unsigned long long payload_item_length) const
 Encodes the given payload item type and length into the buffer. More...
 
void encode_payload_item_char (std::vector< unsigned char > *buffer, uint16 type, unsigned char value) const
 Encodes the given payload item (type, length and value) into the buffer as a char (1 byte). More...
 
void encode_payload_item_int2 (std::vector< unsigned char > *buffer, uint16 type, uint16 value) const
 Encodes the given payload item (type, length and value) into the buffer as a 2 bytes integer. More...
 
void decode_payload_item_int2 (const unsigned char **buffer, uint16 *type, uint16 *value)
 Decodes the given payload item (type, length and value) from the buffer as a 2 bytes integer. More...
 
void encode_payload_item_int4 (std::vector< unsigned char > *buffer, uint16 type, uint32 value) const
 Encodes the given payload item (type, length and value) into the buffer as a 4 bytes integer. More...
 
void decode_payload_item_int4 (const unsigned char **buffer, uint16 *type, uint32 *value)
 Decodes the given payload item (type, length and value) from the buffer as a 4 bytes integer. More...
 
void encode_payload_item_int8 (std::vector< unsigned char > *buffer, uint16 type, ulonglong value) const
 Encodes the given payload item (type, length and value) into the buffer as a 8 bytes integer. More...
 
void encode_payload_item_string (std::vector< unsigned char > *buffer, uint16 type, const char *value, unsigned long long length) const
 Encodes the given payload item (type, length and value) into the buffer as a char array (variable size). More...
 
void decode_payload_item_string (const unsigned char **buffer, uint16 *type, std::string *value, unsigned long long *length)
 Decodes the given payload item (type, length and value) from the buffer as a char array (variable size). More...
 
void encode_payload_item_bytes (std::vector< unsigned char > *buffer, uint16 type, const unsigned char *value, unsigned long long length) const
 Encodes the given payload item (type, length and value) into the buffer as a byte buffer (variable size). More...
 
void decode_payload_item_bytes (const unsigned char **buffer, uint16 *type, unsigned char *value, unsigned long long *length)
 Decodes the given payload item (type, length and value) from the buffer as a byte buffer (variable size). More...
 

Private Member Functions

bool in_primary_mode_internal ()
 Internal method without concurrency control. More...
 
bool has_lower_uuid_internal (Group_member_info *other)
 Return true if server uuid is lower than other member server uuid Internal method without concurrency control. More...
 

Private Attributes

mysql_mutex_t update_lock
 
std::string hostname
 
uint port
 
std::string uuid
 
Group_member_status status
 
Gcs_member_identifiergcs_member_id {nullptr}
 
Member_versionmember_version {nullptr}
 
std::string executed_gtid_set
 
std::string purged_gtid_set
 
std::string retrieved_gtid_set
 
uint write_set_extraction_algorithm
 
uint64 gtid_assignment_block_size
 
bool unreachable
 
Group_member_role role
 
uint32 configuration_flags
 
bool conflict_detection_enable
 
uint member_weight
 
uint lower_case_table_names
 
bool default_table_encryption
 
bool group_action_running
 
bool primary_election_running
 
std::string recovery_endpoints
 
std::string m_view_change_uuid
 
bool m_allow_single_leader
 
std::string m_group_action_running_name
 
std::string m_group_action_running_description
 
bool m_preemptive_garbage_collection {PREEMPTIVE_GARBAGE_COLLECTION_DEFAULT}
 

Additional Inherited Members

- Static Public Attributes inherited from Plugin_gcs_message
static const int PLUGIN_GCS_MESSAGE_VERSION = 1
 The protocol version number. More...
 
static const unsigned int WIRE_VERSION_SIZE = 4
 The protocol version number. More...
 
static const unsigned int WIRE_HD_LEN_SIZE = 2
 The on-the-wire size of the header length field. More...
 
static const unsigned int WIRE_MSG_LEN_SIZE = 8
 The on-the-wire size of the message size field. More...
 
static const unsigned int WIRE_CARGO_TYPE_SIZE = 2
 The on-the-wire size of the cargo type field. More...
 
static const unsigned int WIRE_FIXED_HEADER_SIZE
 The on-the-wire size of the fixed header. More...
 
static const unsigned int WIRE_PAYLOAD_ITEM_TYPE_SIZE = 2
 The on-the-wire size of the each payload item type field. More...
 
static const unsigned int WIRE_PAYLOAD_ITEM_LEN_SIZE = 8
 The on-the-wire size of the each payload item size field. More...
 
static const unsigned int WIRE_PAYLOAD_ITEM_HEADER_SIZE
 The on-the-wire size of the payload item header. More...
 
- Static Protected Member Functions inherited from Plugin_gcs_message
static int64_t get_sent_timestamp (const unsigned char *buffer, size_t length, const uint16 timestamp_payload_item_type)
 Return the time at which the message contained in the buffer was sent. More...
 
static void decode_payload_item_type_and_length (const unsigned char **buffer, uint16 *payload_item_type, unsigned long long *payload_item_length)
 Decodes the given payload item type and length from the buffer. More...
 
static void decode_payload_item_char (const unsigned char **buffer, uint16 *type, unsigned char *value)
 Decodes the given payload item (type, length and value) from the buffer as a char (1 byte). More...
 
static void decode_payload_item_int8 (const unsigned char **buffer, uint16 *type, uint64 *value)
 Decodes the given payload item (type, length and value) from the buffer as a 8 bytes integer. More...
 

Member Enumeration Documentation

◆ enum_payload_item_type

Enumerator
PIT_UNKNOWN 
PIT_HOSTNAME 
PIT_PORT 
PIT_UUID 
PIT_GCS_ID 
PIT_STATUS 
PIT_VERSION 
PIT_WRITE_SET_EXTRACTION_ALGORITHM 
PIT_EXECUTED_GTID 
PIT_RETRIEVED_GTID 
PIT_GTID_ASSIGNMENT_BLOCK_SIZE 
PIT_MEMBER_ROLE 
PIT_CONFIGURATION_FLAGS 
PIT_CONFLICT_DETECTION_ENABLE 
PIT_MEMBER_WEIGHT 
PIT_LOWER_CASE_TABLE_NAME 
PIT_GROUP_ACTION_RUNNING 
PIT_PRIMARY_ELECTION_RUNNING 
PIT_DEFAULT_TABLE_ENCRYPTION 
PIT_PURGED_GTID 
PIT_RECOVERY_ENDPOINTS 
PIT_VIEW_CHANGE_UUID 
PIT_ALLOW_SINGLE_LEADER 
PIT_GROUP_ACTION_RUNNING_NAME 
PIT_GROUP_ACTION_RUNNING_DESCRIPTION 
PIT_PREEMPTIVE_GARBAGE_COLLECTION 
PIT_MAX 

◆ enum_transaction_write_set_hashing_algorithm_compatibility

Enumerator
HASH_ALGORITHM_OFF 
HASH_ALGORITHM_MURMUR32 
HASH_ALGORITHM_XXHASH64 

◆ Group_member_role

Enumerator
MEMBER_ROLE_PRIMARY 
MEMBER_ROLE_SECONDARY 
MEMBER_ROLE_END 

◆ Group_member_status

Enumerator
MEMBER_ONLINE 
MEMBER_OFFLINE 
MEMBER_IN_RECOVERY 
MEMBER_ERROR 
MEMBER_UNREACHABLE 
MEMBER_END 

Constructor & Destructor Documentation

◆ Group_member_info() [1/4]

Group_member_info::Group_member_info ( PSI_mutex_key  psi_mutex_key_arg = key_GR_LOCK_group_member_info_update_lock)

Group_member_info empty constructor.

Parameters
[in]psi_mutex_key_argmutex key

◆ Group_member_info() [2/4]

Group_member_info::Group_member_info ( const char *  hostname_arg,
uint  port_arg,
const char *  uuid_arg,
int  write_set_extraction_algorithm,
const std::string &  gcs_member_id_arg,
Group_member_info::Group_member_status  status_arg,
Member_version member_version_arg,
ulonglong  gtid_assignment_block_size_arg,
Group_member_info::Group_member_role  role_arg,
bool  in_single_primary_mode,
bool  has_enforces_update_everywhere_checks,
uint  member_weight_arg,
uint  lower_case_table_names_arg,
bool  default_table_encryption_arg,
const char *  recovery_endpoints_arg,
const char *  view_change_uuid_arg,
bool  allow_single_leader,
bool  preemptive_garbage_collection,
PSI_mutex_key  psi_mutex_key_arg = key_GR_LOCK_group_member_info_update_lock 
)

Group_member_info constructor.

Parameters
[in]hostname_argmember hostname
[in]port_argmember port
[in]uuid_argmember uuid
[in]write_set_extraction_algorithmwrite set extraction algorithm
[in]gcs_member_id_argmember GCS member identifier
[in]status_argmember Recovery status
[in]member_version_argmember version
[in]gtid_assignment_block_size_argmember gtid assignment block size
[in]role_argmember role within the group
[in]in_single_primary_modeis member in single mode
[in]has_enforces_update_everywhere_checkshas member enforce update check
[in]member_weight_argmember_weight
[in]lower_case_table_names_arglower case table names
[in]default_table_encryption_argdefault_table_encryption
[in]recovery_endpoints_argrecovery endpoints
[in]view_change_uuid_argview change uuid advertised
[in]allow_single_leaderflag indicating whether or
[in]preemptive_garbage_collectionmember's group_replication_preemptive_garbage_collection value not to use single-leader behavior
[in]psi_mutex_key_argmutex key

◆ Group_member_info() [3/4]

Group_member_info::Group_member_info ( Group_member_info other)

Copy constructor.

Parameters
othersource of the copy

◆ Group_member_info() [4/4]

Group_member_info::Group_member_info ( const uchar data,
size_t  len,
PSI_mutex_key  psi_mutex_key_arg = key_GR_LOCK_group_member_info_update_lock 
)

Group_member_info raw data constructor.

Parameters
[in]dataraw data
[in]lenraw data length
[in]psi_mutex_key_argmutex key

◆ ~Group_member_info()

Group_member_info::~Group_member_info ( )
override

Destructor.

Member Function Documentation

◆ comparator_group_member_uuid()

bool Group_member_info::comparator_group_member_uuid ( Group_member_info m1,
Group_member_info m2 
)
static
Returns
Compare two members using server uuid

◆ comparator_group_member_version()

bool Group_member_info::comparator_group_member_version ( Group_member_info m1,
Group_member_info m2 
)
static
Returns
Compare two members using member version

◆ comparator_group_member_weight()

bool Group_member_info::comparator_group_member_weight ( Group_member_info m1,
Group_member_info m2 
)
static
Returns
Compare two members using member weight
Note
if the weight is same, the member is sorted in lexicographical order using its uuid.

◆ decode_payload()

void Group_member_info::decode_payload ( const unsigned char *  buffer,
const unsigned char *  end 
)
overrideprotectedvirtual

Decodes the contents of the buffer and sets the payload field values according to the values decoded.

Parameters
[in]bufferthe buffer to decode from.
[in]endthe end of the buffer.

Implements Plugin_gcs_message.

◆ disable_conflict_detection()

void Group_member_info::disable_conflict_detection ( )

Update this member conflict detection to false.

◆ enable_conflict_detection()

void Group_member_info::enable_conflict_detection ( )

Update this member conflict detection to true.

◆ encode_payload()

void Group_member_info::encode_payload ( std::vector< unsigned char > *  buffer) const
overrideprotectedvirtual

Encodes the contents of this instance payload into the buffer.

Parameters
[out]bufferthe buffer to encode to.

Implements Plugin_gcs_message.

◆ get_allow_single_leader()

bool Group_member_info::get_allow_single_leader ( )

◆ get_configuration_flag_string()

const char * Group_member_info::get_configuration_flag_string ( const uint32  configuation_flag)
static
Returns
configuration flag as string

◆ get_configuration_flags()

uint32 Group_member_info::get_configuration_flags ( )
Returns
the member configuration flags

◆ get_configuration_flags_string()

std::string Group_member_info::get_configuration_flags_string ( const uint32  configuation_flags)
static
Returns
the member configuration flags as string

◆ get_default_table_encryption()

bool Group_member_info::get_default_table_encryption ( )
Returns
the global-variable lower case table names value

◆ get_gcs_member_id()

Gcs_member_identifier Group_member_info::get_gcs_member_id ( )
Returns
the member identifier in the GCS layer

◆ get_group_action_running_description()

const std::string & Group_member_info::get_group_action_running_description ( )

Get group action description if running on the member.

Refer group_action_running to check if any action is running.

Returns
group action description if running on the member

◆ get_group_action_running_name()

const std::string & Group_member_info::get_group_action_running_name ( )

Get group action name if running on the member.

Refer group_action_running to check if any action is running.

Returns
group action name if running on the member

◆ get_gtid_assignment_block_size()

ulonglong Group_member_info::get_gtid_assignment_block_size ( )
Returns
the member gtid assignment block size

◆ get_gtid_executed()

std::string Group_member_info::get_gtid_executed ( )
Returns
the member GTID_EXECUTED set

◆ get_gtid_purged()

std::string Group_member_info::get_gtid_purged ( )
Returns
the member GTID_PURGED set

◆ get_gtid_retrieved()

std::string Group_member_info::get_gtid_retrieved ( )
Returns
the member GTID_RETRIEVED set for the applier channel

◆ get_hostname()

string Group_member_info::get_hostname ( )
Returns
the member hostname

◆ get_lower_case_table_names()

uint Group_member_info::get_lower_case_table_names ( )
Returns
the global-variable lower case table names value

◆ get_member_role_string()

const char * Group_member_info::get_member_role_string ( )
Returns
the member role type code in string

◆ get_member_status_string()

const char * Group_member_info::get_member_status_string ( Group_member_status  status)
static
Returns
the member status as string.

◆ get_member_version()

Member_version Group_member_info::get_member_version ( )
Returns
the member plugin version

◆ get_member_weight()

uint Group_member_info::get_member_weight ( )

Return member weight.

◆ get_port()

uint Group_member_info::get_port ( )
Returns
the member port

◆ get_preemptive_garbage_collection()

bool Group_member_info::get_preemptive_garbage_collection ( )

Get the value of 'group_replication_preemptive_garbage_collection' option on this member.

Returns
true enabled false disabled

◆ get_recovery_endpoints()

string Group_member_info::get_recovery_endpoints ( )

List of member advertised recovery endpoints.

Returns
recovery endpoints

◆ get_recovery_status()

Group_member_info::Group_member_status Group_member_info::get_recovery_status ( )
Returns
the member recovery status

◆ get_role()

Group_member_info::Group_member_role Group_member_info::get_role ( )
Returns
the member role type code.

◆ get_uuid()

string Group_member_info::get_uuid ( )
Returns
the member uuid

◆ get_view_change_uuid()

string Group_member_info::get_view_change_uuid ( )

Get UID used when logging view change events.

Returns
view change uuid or "AUTOMATIC"

◆ get_write_set_extraction_algorithm()

uint Group_member_info::get_write_set_extraction_algorithm ( )
Returns
the member algorithm for extracting write sets

◆ get_write_set_extraction_algorithm_name()

const char * Group_member_info::get_write_set_extraction_algorithm_name ( )
Returns
the member algorithm name for extracting write sets

◆ has_enforces_update_everywhere_checks()

bool Group_member_info::has_enforces_update_everywhere_checks ( )
Returns
the member state of system variable group_replication_enforce_update_everywhere_checks

◆ has_greater_version()

bool Group_member_info::has_greater_version ( Group_member_info other)

Return true if member version is higher than other member version.

◆ has_greater_weight()

bool Group_member_info::has_greater_weight ( Group_member_info other)

Return true if member weight is higher than other member weight.

◆ has_lower_uuid()

bool Group_member_info::has_lower_uuid ( Group_member_info other)

Return true if server uuid is lower than other member server uuid.

◆ has_lower_uuid_internal()

bool Group_member_info::has_lower_uuid_internal ( Group_member_info other)
private

Return true if server uuid is lower than other member server uuid Internal method without concurrency control.

◆ in_primary_mode()

bool Group_member_info::in_primary_mode ( )
Returns
the member state of system variable group_replication_single_primary_mode

◆ in_primary_mode_internal()

bool Group_member_info::in_primary_mode_internal ( )
private

Internal method without concurrency control.

Returns
the member state of system variable group_replication_single_primary_mode

◆ is_conflict_detection_enabled()

bool Group_member_info::is_conflict_detection_enabled ( )

Return true if conflict detection is enable on this member.

◆ is_group_action_running()

bool Group_member_info::is_group_action_running ( )
Returns
is a group action running in this member

◆ is_primary_election_running()

bool Group_member_info::is_primary_election_running ( )
Returns
is a primary election running in this member

◆ is_unreachable()

bool Group_member_info::is_unreachable ( )

Return true if this has been flagged as unreachable.

◆ operator delete() [1/2]

void Group_member_info::operator delete ( void *  ptr)
inlinenoexcept

Deallocate memory on the heap with instrumented memory allocation, so that memory consumption can be tracked.

Parameters
[in]ptrpointer to the allocated memory

◆ operator delete() [2/2]

void Group_member_info::operator delete ( void *  ptr,
const std::nothrow_t &   
)
inlinenoexcept

◆ operator new() [1/2]

void * Group_member_info::operator new ( size_t  size)
inlinenoexcept

Allocate memory on the heap with instrumented memory allocation, so that memory consumption can be tracked.

Parameters
[in]sizememory size to be allocated
Returns
pointer to the allocated memory, or NULL if memory could not be allocated.

◆ operator new() [2/2]

void * Group_member_info::operator new ( size_t  size,
const std::nothrow_t &   
)
inlinenoexcept

◆ operator==()

bool Group_member_info::operator== ( Group_member_info other)

Redefinition of operate ==, which operate upon the uuid.

◆ set_enforces_update_everywhere_checks_flag()

void Group_member_info::set_enforces_update_everywhere_checks_flag ( bool  enforce_everywhere_checks)

Set the enforces_update_everywhere_checks flag.

Parameters
enforce_everywhere_checksare the update everywhere checks active or not

◆ set_group_action_running_description()

void Group_member_info::set_group_action_running_description ( const std::string &  group_action_running_description)

Set group action description if running on the member.

Refer group_action_running to check if any action is running.

Parameters
group_action_running_descriptionset group action description

◆ set_group_action_running_name()

void Group_member_info::set_group_action_running_name ( const std::string &  group_action_running_name)

Set group action name if running on the member.

Refer group_action_running to check if any action is running.

Parameters
group_action_running_nameset group action name

◆ set_is_group_action_running()

void Group_member_info::set_is_group_action_running ( bool  is_running)

Sets if the member is currently running a group action.

Parameters
is_runningis an action running

◆ set_is_primary_election_running()

void Group_member_info::set_is_primary_election_running ( bool  is_running)

Sets if the member is currently running a primary election.

Parameters
is_runningis an election running

◆ set_member_weight()

void Group_member_info::set_member_weight ( uint  new_member_weight)

Update member weight.

Parameters
[in]new_member_weightnew member_weight to set

◆ set_primary_mode_flag()

void Group_member_info::set_primary_mode_flag ( bool  in_primary_mode)

Set the primary flag.

Parameters
in_primary_modeis the member in primary mode

◆ set_reachable()

void Group_member_info::set_reachable ( )

Sets this member as reachable.

◆ set_recovery_endpoints()

void Group_member_info::set_recovery_endpoints ( const char *  endpoints)

Save list of member advertised recovery endpoints.

Parameters
endpointslist of advertised recovery endpoints

◆ set_role()

void Group_member_info::set_role ( Group_member_role  new_role)

Updates this object member role.

Parameters
[in]new_rolethe role to set.

◆ set_unreachable()

void Group_member_info::set_unreachable ( )

Sets this member as unreachable.

◆ set_view_change_uuid()

void Group_member_info::set_view_change_uuid ( const char *  view_change_cnf)

Save member view change uuid.

Parameters
view_change_cnfuuid to be used on change views or "AUTOMATIC"

◆ update() [1/2]

void Group_member_info::update ( const char *  hostname_arg,
uint  port_arg,
const char *  uuid_arg,
int  write_set_extraction_algorithm,
const std::string &  gcs_member_id_arg,
Group_member_info::Group_member_status  status_arg,
Member_version member_version_arg,
ulonglong  gtid_assignment_block_size_arg,
Group_member_info::Group_member_role  role_arg,
bool  in_single_primary_mode,
bool  has_enforces_update_everywhere_checks,
uint  member_weight_arg,
uint  lower_case_table_names_arg,
bool  default_table_encryption_arg,
const char *  recovery_endpoints_arg,
const char *  view_change_uuid_arg,
bool  allow_single_leader,
bool  preemptive_garbage_collection 
)

Update Group_member_info.

Parameters
[in]hostname_argmember hostname
[in]port_argmember port
[in]uuid_argmember uuid
[in]write_set_extraction_algorithmwrite set extraction algorithm
[in]gcs_member_id_argmember GCS member identifier
[in]status_argmember Recovery status
[in]member_version_argmember version
[in]gtid_assignment_block_size_argmember gtid assignment block size
[in]role_argmember role within the group
[in]in_single_primary_modeis member in single mode
[in]has_enforces_update_everywhere_checkshas member enforce update check
[in]member_weight_argmember_weight
[in]lower_case_table_names_arglower case table names
[in]default_table_encryption_argdefault table encryption
[in]recovery_endpoints_argrecovery endpoints advertised
[in]view_change_uuid_argview change uuid
[in]allow_single_leaderflag indicating whether or not to use single-leader behavior
[in]preemptive_garbage_collectionmember's group_replication_preemptive_garbage_collection value

◆ update() [2/2]

void Group_member_info::update ( Group_member_info other)

Update Group_member_info.

Parameters
othersource of the copy

◆ update_gtid_sets()

void Group_member_info::update_gtid_sets ( std::string &  executed_gtids,
std::string &  purged_gtids,
std::string &  retrieve_gtids 
)

Updates this object GTID sets.

Parameters
[in]executed_gtidsthe status to set
[in]purged_gtidsthe status to set
[in]retrieve_gtidsthe status to set

◆ update_recovery_status()

void Group_member_info::update_recovery_status ( Group_member_status  new_status)

Updates this object recovery status.

Parameters
[in]new_statusthe status to set

Member Data Documentation

◆ configuration_flags

uint32 Group_member_info::configuration_flags
private

◆ conflict_detection_enable

bool Group_member_info::conflict_detection_enable
private

◆ default_table_encryption

bool Group_member_info::default_table_encryption
private

◆ executed_gtid_set

std::string Group_member_info::executed_gtid_set
private

◆ gcs_member_id

Gcs_member_identifier* Group_member_info::gcs_member_id {nullptr}
private

◆ group_action_running

bool Group_member_info::group_action_running
private

◆ gtid_assignment_block_size

uint64 Group_member_info::gtid_assignment_block_size
private

◆ hostname

std::string Group_member_info::hostname
private

◆ lower_case_table_names

uint Group_member_info::lower_case_table_names
private

◆ m_allow_single_leader

bool Group_member_info::m_allow_single_leader
private

◆ m_group_action_running_description

std::string Group_member_info::m_group_action_running_description
private

◆ m_group_action_running_name

std::string Group_member_info::m_group_action_running_name
private

◆ m_preemptive_garbage_collection

bool Group_member_info::m_preemptive_garbage_collection {PREEMPTIVE_GARBAGE_COLLECTION_DEFAULT}
private

◆ m_skip_encode_view_change_uuid

bool Group_member_info::m_skip_encode_view_change_uuid

◆ m_view_change_uuid

std::string Group_member_info::m_view_change_uuid
private

◆ member_version

Member_version* Group_member_info::member_version {nullptr}
private

◆ member_weight

uint Group_member_info::member_weight
private

◆ port

uint Group_member_info::port
private

◆ primary_election_running

bool Group_member_info::primary_election_running
private

◆ psi_mutex_key

PSI_mutex_key Group_member_info::psi_mutex_key

◆ purged_gtid_set

std::string Group_member_info::purged_gtid_set
private

◆ recovery_endpoints

std::string Group_member_info::recovery_endpoints
private

◆ retrieved_gtid_set

std::string Group_member_info::retrieved_gtid_set
private

◆ role

Group_member_role Group_member_info::role
private

◆ skip_encode_default_table_encryption

bool Group_member_info::skip_encode_default_table_encryption

◆ status

Group_member_status Group_member_info::status
private

◆ unreachable

bool Group_member_info::unreachable
private

◆ update_lock

mysql_mutex_t Group_member_info::update_lock
private

◆ uuid

std::string Group_member_info::uuid
private

◆ write_set_extraction_algorithm

uint Group_member_info::write_set_extraction_algorithm
private

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