MySQL 9.7.0
Source Code Documentation
group_replication_elect_prefers_most_updated.cc File Reference

Classes

class  Group_replication_primary_election_imp
 

Functions

 REQUIRES_SERVICE_PLACEHOLDER (mysql_runtime_error)
 
 REQUIRES_SERVICE_PLACEHOLDER (component_sys_variable_register)
 
 REQUIRES_SERVICE_PLACEHOLDER (component_sys_variable_unregister)
 
 REQUIRES_SERVICE_PLACEHOLDER (registry_registration)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (status_variable_registration, statvar_register_srv)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (log_builtins, log_bi)
 
 REQUIRES_SERVICE_PLACEHOLDER_AS (log_builtins_string, log_bs)
 
const std::string comp_enable_full_error_name (std::string(component_name)+std::string(".")+std::string(component_name))
 
static int gr_primary_election_uptodate_to_apply (THD *, SHOW_VAR *var, char *buf)
 
static int gr_primary_election_uptodate_timestamp (THD *, SHOW_VAR *var, char *buf)
 
int register_system_variables ()
 Register global system variables with component information. More...
 
int unregister_system_variables ()
 Unregister global system variables with component information. More...
 
mysql_service_status_t group_replication_primary_election_init ()
 Initialization entry method for Component used when loading the Component. More...
 
mysql_service_status_t group_replication_primary_election_deinit ()
 De-initialization method for Component used when unloading the Component. More...
 
 PROVIDES_SERVICE (group_replication_primary_election, group_replication_primary_election)
 
 END_COMPONENT_PROVIDES ()
 
 REQUIRES_SERVICE (mysql_runtime_error)
 
 REQUIRES_SERVICE_AS (status_variable_registration, statvar_register_srv)
 
 REQUIRES_SERVICE (component_sys_variable_register)
 
 REQUIRES_SERVICE (component_sys_variable_unregister)
 
 REQUIRES_SERVICE (registry_registration)
 
 REQUIRES_SERVICE_AS (log_builtins, log_bi)
 
 REQUIRES_SERVICE_AS (log_builtins_string, log_bs)
 
 END_COMPONENT_REQUIRES ()
 
 METADATA ("mysql.author", "Oracle Corporation")
 
 METADATA ("mysql.license", "GPL")
 
 END_COMPONENT_METADATA ()
 
DECLARE_LIBRARY_COMPONENTSCOMPONENT_REF (group_replication_primary_election_component)
 

Variables

const char component_name [] = LOG_COMPONENT_TAG
 
const char component_enable_var_name [] = "enabled"
 
static std::atomic< bool > enabled {true}
 
static std::atomic< uint64_t > gr_most_uptodate_delta_to_apply {0}
 
static std::string gr_most_uptodate_timestamp {""}
 
static SHOW_VAR status_func_var []
 
const mysql_service_group_replication_primary_election_t imp_group_replication_primary_election_group_replication_primary_election
 
mysql_component_t mysql_component_group_replication_primary_election_component
 

Function Documentation

◆ comp_enable_full_error_name()

const std::string comp_enable_full_error_name ( std::string(component_name)+std::string(".")+std::string(component_name )

◆ COMPONENT_REF()

DECLARE_LIBRARY_COMPONENTS & COMPONENT_REF ( group_replication_primary_election_component  )

◆ END_COMPONENT_METADATA()

END_COMPONENT_METADATA ( )

◆ END_COMPONENT_PROVIDES()

END_COMPONENT_PROVIDES ( )

◆ END_COMPONENT_REQUIRES()

END_COMPONENT_REQUIRES ( )

◆ gr_primary_election_uptodate_timestamp()

static int gr_primary_election_uptodate_timestamp ( THD ,
SHOW_VAR var,
char *  buf 
)
static

◆ gr_primary_election_uptodate_to_apply()

static int gr_primary_election_uptodate_to_apply ( THD ,
SHOW_VAR var,
char *  buf 
)
static

◆ group_replication_primary_election_deinit()

mysql_service_status_t group_replication_primary_election_deinit ( )

De-initialization method for Component used when unloading the Component.

Returns
Status of performed operation
Return values
0success
non-zerofailure

◆ group_replication_primary_election_init()

mysql_service_status_t group_replication_primary_election_init ( )

Initialization entry method for Component used when loading the Component.

Returns
Status of performed operation
Return values
0success
non-zerofailure

◆ METADATA() [1/2]

METADATA ( "mysql.author"  ,
"Oracle Corporation"   
)

◆ METADATA() [2/2]

METADATA ( "mysql.license"  ,
"GPL"   
)

◆ PROVIDES_SERVICE()

PROVIDES_SERVICE ( group_replication_primary_election  ,
group_replication_primary_election   
)

◆ register_system_variables()

int register_system_variables ( )

Register global system variables with component information.

Returns
Status of performed operation
Return values
0success
non-zerofailure

◆ REQUIRES_SERVICE() [1/4]

REQUIRES_SERVICE ( component_sys_variable_register  )

◆ REQUIRES_SERVICE() [2/4]

REQUIRES_SERVICE ( component_sys_variable_unregister  )

◆ REQUIRES_SERVICE() [3/4]

REQUIRES_SERVICE ( mysql_runtime_error  )

◆ REQUIRES_SERVICE() [4/4]

REQUIRES_SERVICE ( registry_registration  )

◆ REQUIRES_SERVICE_AS() [1/3]

REQUIRES_SERVICE_AS ( log_builtins  ,
log_bi   
)

◆ REQUIRES_SERVICE_AS() [2/3]

REQUIRES_SERVICE_AS ( log_builtins_string  ,
log_bs   
)

◆ REQUIRES_SERVICE_AS() [3/3]

REQUIRES_SERVICE_AS ( status_variable_registration  ,
statvar_register_srv   
)

◆ REQUIRES_SERVICE_PLACEHOLDER() [1/4]

REQUIRES_SERVICE_PLACEHOLDER ( component_sys_variable_register  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [2/4]

REQUIRES_SERVICE_PLACEHOLDER ( component_sys_variable_unregister  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [3/4]

REQUIRES_SERVICE_PLACEHOLDER ( mysql_runtime_error  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [4/4]

REQUIRES_SERVICE_PLACEHOLDER ( registry_registration  )

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [1/3]

REQUIRES_SERVICE_PLACEHOLDER_AS ( log_builtins  ,
log_bi   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [2/3]

REQUIRES_SERVICE_PLACEHOLDER_AS ( log_builtins_string  ,
log_bs   
)

◆ REQUIRES_SERVICE_PLACEHOLDER_AS() [3/3]

REQUIRES_SERVICE_PLACEHOLDER_AS ( status_variable_registration  ,
statvar_register_srv   
)

◆ unregister_system_variables()

int unregister_system_variables ( )

Unregister global system variables with component information.

Returns
Status of performed operation
Return values
0success
non-zerofailure

Variable Documentation

◆ component_enable_var_name

const char component_enable_var_name[] = "enabled"

◆ component_name

const char component_name[] = LOG_COMPONENT_TAG

◆ enabled

std::atomic<bool> enabled {true}
static

◆ gr_most_uptodate_delta_to_apply

std::atomic<uint64_t> gr_most_uptodate_delta_to_apply {0}
static

◆ gr_most_uptodate_timestamp

std::string gr_most_uptodate_timestamp {""}
static

◆ imp_group_replication_primary_election_group_replication_primary_election

const mysql_service_group_replication_primary_election_t imp_group_replication_primary_election_group_replication_primary_election
Initial value:
= {
}
static mysql_service_status_t update_primary_election_status(char *timestamp, uint64_t transactions_delta) noexcept
Definition: group_replication_elect_prefers_most_updated.cc:100

◆ mysql_component_group_replication_primary_election_component

mysql_component_t mysql_component_group_replication_primary_election_component
Initial value:
= { "mysql:group_replication_elect_prefers_most_updated" , __group_replication_primary_election_component_provides, __group_replication_primary_election_component_requires, __group_replication_primary_election_component_metadata,
mysql_service_status_t group_replication_primary_election_deinit()
De-initialization method for Component used when unloading the Component.
Definition: group_replication_elect_prefers_most_updated.cc:186
mysql_service_status_t group_replication_primary_election_init()
Initialization entry method for Component used when loading the Component.
Definition: group_replication_elect_prefers_most_updated.cc:175

◆ status_func_var

SHOW_VAR status_func_var[]
static
Initial value:
= {
{"Gr_latest_primary_election_by_most_uptodate_members_trx_delta",
{"Gr_latest_primary_election_by_most_uptodate_member_timestamp",
reinterpret_cast<char *>(gr_primary_election_uptodate_timestamp),
{nullptr, nullptr, SHOW_UNDEF,
}
static int gr_primary_election_uptodate_timestamp(THD *, SHOW_VAR *var, char *buf)
Definition: group_replication_elect_prefers_most_updated.cc:71
static int gr_primary_election_uptodate_to_apply(THD *, SHOW_VAR *var, char *buf)
Definition: group_replication_elect_prefers_most_updated.cc:58
@ SHOW_FUNC
Definition: status_variables_bits.h:41
@ SHOW_UNDEF
Definition: status_variables_bits.h:33
@ SHOW_SCOPE_GLOBAL
Definition: status_variables_bits.h:72
@ SHOW_SCOPE_UNDEF
Definition: status_variables_bits.h:71