MySQL 8.0.40
Source Code Documentation
|
#include <member_info.h>
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, 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) |
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 () |
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... | |
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) |
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... | |
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_identifier * | gcs_member_id {nullptr} |
Member_version * | member_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 |
Additional Inherited Members |
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.
[in] | psi_mutex_key_arg | mutex key |
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, | ||
PSI_mutex_key | psi_mutex_key_arg = key_GR_LOCK_group_member_info_update_lock |
||
) |
Group_member_info constructor.
[in] | hostname_arg | member hostname |
[in] | port_arg | member port |
[in] | uuid_arg | member uuid |
[in] | write_set_extraction_algorithm | write set extraction algorithm |
[in] | gcs_member_id_arg | member GCS member identifier |
[in] | status_arg | member Recovery status |
[in] | member_version_arg | member version |
[in] | gtid_assignment_block_size_arg | member gtid assignment block size |
[in] | role_arg | member role within the group |
[in] | in_single_primary_mode | is member in single mode |
[in] | has_enforces_update_everywhere_checks | has member enforce update check |
[in] | member_weight_arg | member_weight |
[in] | lower_case_table_names_arg | lower case table names |
[in] | default_table_encryption_arg | default_table_encryption |
[in] | recovery_endpoints_arg | recovery endpoints |
[in] | view_change_uuid_arg | view change uuid advertised |
[in] | allow_single_leader | flag indicating whether or not to use single-leader behavior |
[in] | psi_mutex_key_arg | mutex key |
Group_member_info::Group_member_info | ( | Group_member_info & | other | ) |
Copy constructor.
other | source of the copy |
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.
[in] | data | raw data |
[in] | len | raw data length |
[in] | psi_mutex_key_arg | mutex key |
|
override |
Destructor.
|
static |
|
static |
|
static |
|
overrideprotectedvirtual |
Decodes the contents of the buffer and sets the payload field values according to the values decoded.
[in] | buffer | the buffer to decode from. |
[in] | end | the end of the buffer. |
Implements Plugin_gcs_message.
void Group_member_info::disable_conflict_detection | ( | ) |
Update this member conflict detection to false.
void Group_member_info::enable_conflict_detection | ( | ) |
Update this member conflict detection to true.
|
overrideprotectedvirtual |
Encodes the contents of this instance payload into the buffer.
[out] | buffer | the buffer to encode to. |
Implements Plugin_gcs_message.
bool Group_member_info::get_allow_single_leader | ( | ) |
|
static |
uint32 Group_member_info::get_configuration_flags | ( | ) |
|
static |
bool Group_member_info::get_default_table_encryption | ( | ) |
Gcs_member_identifier Group_member_info::get_gcs_member_id | ( | ) |
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.
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.
ulonglong Group_member_info::get_gtid_assignment_block_size | ( | ) |
std::string Group_member_info::get_gtid_executed | ( | ) |
std::string Group_member_info::get_gtid_purged | ( | ) |
std::string Group_member_info::get_gtid_retrieved | ( | ) |
string Group_member_info::get_hostname | ( | ) |
uint Group_member_info::get_lower_case_table_names | ( | ) |
const char * Group_member_info::get_member_role_string | ( | ) |
|
static |
Member_version Group_member_info::get_member_version | ( | ) |
uint Group_member_info::get_member_weight | ( | ) |
Return member weight.
uint Group_member_info::get_port | ( | ) |
string Group_member_info::get_recovery_endpoints | ( | ) |
List of member advertised recovery endpoints.
Group_member_info::Group_member_status Group_member_info::get_recovery_status | ( | ) |
Group_member_info::Group_member_role Group_member_info::get_role | ( | ) |
string Group_member_info::get_uuid | ( | ) |
string Group_member_info::get_view_change_uuid | ( | ) |
Get UID used when logging view change events.
uint Group_member_info::get_write_set_extraction_algorithm | ( | ) |
bool Group_member_info::has_enforces_update_everywhere_checks | ( | ) |
bool Group_member_info::has_greater_version | ( | Group_member_info * | other | ) |
Return true if member version is higher than other member version.
bool Group_member_info::has_greater_weight | ( | Group_member_info * | other | ) |
Return true if member weight is higher than other member weight.
bool Group_member_info::has_lower_uuid | ( | Group_member_info * | other | ) |
Return true if server uuid is lower than other member server uuid.
|
private |
Return true if server uuid is lower than other member server uuid Internal method without concurrency control.
bool Group_member_info::in_primary_mode | ( | ) |
|
private |
Internal method without concurrency control.
bool Group_member_info::is_conflict_detection_enabled | ( | ) |
Return true if conflict detection is enable on this member.
bool Group_member_info::is_group_action_running | ( | ) |
bool Group_member_info::is_primary_election_running | ( | ) |
bool Group_member_info::is_unreachable | ( | ) |
Return true if this has been flagged as unreachable.
|
inlinenoexcept |
Deallocate memory on the heap with instrumented memory allocation, so that memory consumption can be tracked.
[in] | ptr | pointer to the allocated memory |
|
inlinenoexcept |
|
inlinenoexcept |
Allocate memory on the heap with instrumented memory allocation, so that memory consumption can be tracked.
[in] | size | memory size to be allocated |
|
inlinenoexcept |
bool Group_member_info::operator== | ( | Group_member_info & | other | ) |
Redefinition of operate ==, which operate upon the uuid.
void Group_member_info::set_enforces_update_everywhere_checks_flag | ( | bool | enforce_everywhere_checks | ) |
Set the enforces_update_everywhere_checks flag.
enforce_everywhere_checks | are the update everywhere checks active or not |
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.
group_action_running_description | set group action description |
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.
group_action_running_name | set group action name |
void Group_member_info::set_is_group_action_running | ( | bool | is_running | ) |
Sets if the member is currently running a group action.
is_running | is an action running |
void Group_member_info::set_is_primary_election_running | ( | bool | is_running | ) |
Sets if the member is currently running a primary election.
is_running | is an election running |
void Group_member_info::set_member_weight | ( | uint | new_member_weight | ) |
Update member weight.
[in] | new_member_weight | new member_weight to set |
void Group_member_info::set_primary_mode_flag | ( | bool | in_primary_mode | ) |
Set the primary flag.
in_primary_mode | is the member in primary mode |
void Group_member_info::set_reachable | ( | ) |
Sets this member as reachable.
void Group_member_info::set_recovery_endpoints | ( | const char * | endpoints | ) |
Save list of member advertised recovery endpoints.
endpoints | list of advertised recovery endpoints |
void Group_member_info::set_role | ( | Group_member_role | new_role | ) |
Updates this object member role.
[in] | new_role | the role to set. |
void Group_member_info::set_unreachable | ( | ) |
Sets this member as unreachable.
void Group_member_info::set_view_change_uuid | ( | const char * | view_change_cnf | ) |
Save member view change uuid.
view_change_cnf | uuid to be used on change views or "AUTOMATIC" |
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 | ||
) |
Update Group_member_info.
[in] | hostname_arg | member hostname |
[in] | port_arg | member port |
[in] | uuid_arg | member uuid |
[in] | write_set_extraction_algorithm | write set extraction algorithm |
[in] | gcs_member_id_arg | member GCS member identifier |
[in] | status_arg | member Recovery status |
[in] | member_version_arg | member version |
[in] | gtid_assignment_block_size_arg | member gtid assignment block size |
[in] | role_arg | member role within the group |
[in] | in_single_primary_mode | is member in single mode |
[in] | has_enforces_update_everywhere_checks | has member enforce update check |
[in] | member_weight_arg | member_weight |
[in] | lower_case_table_names_arg | lower case table names |
[in] | default_table_encryption_arg | default table encryption |
[in] | recovery_endpoints_arg | recovery endpoints advertised |
[in] | view_change_uuid_arg | view change uuid |
[in] | allow_single_leader | flag indicating whether or not to use single-leader behavior |
void Group_member_info::update | ( | Group_member_info & | other | ) |
Update Group_member_info.
other | source of the copy |
void Group_member_info::update_gtid_sets | ( | std::string & | executed_gtids, |
std::string & | purged_gtids, | ||
std::string & | retrieve_gtids | ||
) |
Updates this object GTID sets.
[in] | executed_gtids | the status to set |
[in] | purged_gtids | the status to set |
[in] | retrieve_gtids | the status to set |
void Group_member_info::update_recovery_status | ( | Group_member_status | new_status | ) |
Updates this object recovery status.
[in] | new_status | the status to set |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
bool Group_member_info::m_skip_encode_view_change_uuid |
|
private |
|
private |
|
private |
|
private |
|
private |
PSI_mutex_key Group_member_info::psi_mutex_key |
|
private |
|
private |
|
private |
|
private |
bool Group_member_info::skip_encode_default_table_encryption |
|
private |
|
private |
|
private |
|
private |
|
private |