MySQL 8.4.2
Source Code Documentation
Async_conn_failover_manager Class Reference

#include <rpl_async_conn_failover.h>

Public Types

enum class  DoAutoConnFailoverError { no_error = 0 , retriable_error , no_sources_error }
 
enum class  SourceQuorumStatus { no_error = 0 , fatal_error , transient_network_error , no_quorum_error }
 

Public Member Functions

 Async_conn_failover_manager ()=delete
 
 Async_conn_failover_manager (const Async_conn_failover_manager &)=delete
 
 Async_conn_failover_manager (Async_conn_failover_manager &&)=delete
 
Async_conn_failover_manageroperator= (const Async_conn_failover_manager &)=delete
 
Async_conn_failover_manageroperator= (Async_conn_failover_manager &&)=delete
 

Static Public Member Functions

static DoAutoConnFailoverError do_auto_conn_failover (Master_info *mi, bool force_highest_weight)
 Re-establishes connection to next available source. More...
 
static SourceQuorumStatus get_source_quorum_status (MYSQL *mysql, Master_info *mi)
 
static void log_error_for_async_executing_query_failure (const longlong sql_errno, MYSQL *mysql, Master_info *mi)
 Logs error for failure while executing queries. More...
 

Static Private Member Functions

static bool set_channel_conn_details (Master_info *mi, const std::string host, const uint port, const std::string network_namespace)
 Sets source network configuration details <host, port, network_namespace> for the provided Master_info object. More...
 

Member Enumeration Documentation

◆ DoAutoConnFailoverError

Enumerator
no_error 
retriable_error 
no_sources_error 

◆ SourceQuorumStatus

Enumerator
no_error 
fatal_error 
transient_network_error 
no_quorum_error 

Constructor & Destructor Documentation

◆ Async_conn_failover_manager() [1/3]

Async_conn_failover_manager::Async_conn_failover_manager ( )
delete

◆ Async_conn_failover_manager() [2/3]

Async_conn_failover_manager::Async_conn_failover_manager ( const Async_conn_failover_manager )
delete

◆ Async_conn_failover_manager() [3/3]

Async_conn_failover_manager::Async_conn_failover_manager ( Async_conn_failover_manager &&  )
delete

Member Function Documentation

◆ do_auto_conn_failover()

Async_conn_failover_manager::DoAutoConnFailoverError Async_conn_failover_manager::do_auto_conn_failover ( Master_info mi,
bool  force_highest_weight 
)
static

Re-establishes connection to next available source.

Parameters
[in]mithe mi of the failed connection which needs to be reconnected to the new source.
[in]force_highest_weightWhen true, sender with highest weight is chosen, otherwise the next sender from the current one is chosen.
Return values
Pleasesee DoAutoConnFailoverError.

◆ get_source_quorum_status()

Async_conn_failover_manager::SourceQuorumStatus Async_conn_failover_manager::get_source_quorum_status ( MYSQL mysql,
Master_info mi 
)
static

◆ log_error_for_async_executing_query_failure()

static void Async_conn_failover_manager::log_error_for_async_executing_query_failure ( const longlong  sql_errno,
MYSQL mysql,
Master_info mi 
)
inlinestatic

Logs error for failure while executing queries.

It logs error for following server error codes: ER_RPL_ASYNC_CHECK_CONNECTION_ERROR ER_RPL_ASYNC_MONITOR_IO_THD_FETCH_GROUP_MAJORITY_ERROR ER_RPL_ASYNC_REPLICA_IO_THD_FETCH_GROUP_MAJORITY_ERROR ER_RPL_ASYNC_GET_GROUP_MEMBERSHIP_DETAILS_ERROR

Parameters
sql_errnoServer error code.
mysqlMYSQL to request uuid from source.
miMaster_info to set master_uuid.

◆ operator=() [1/2]

Async_conn_failover_manager & Async_conn_failover_manager::operator= ( Async_conn_failover_manager &&  )
delete

◆ operator=() [2/2]

Async_conn_failover_manager & Async_conn_failover_manager::operator= ( const Async_conn_failover_manager )
delete

◆ set_channel_conn_details()

bool Async_conn_failover_manager::set_channel_conn_details ( Master_info mi,
const std::string  host,
const uint  port,
const std::string  network_namespace 
)
staticprivate

Sets source network configuration details <host, port, network_namespace> for the provided Master_info object.

The function is used by async conn failure to set configuration details of new source.

Parameters
[in]mithe channel of the failed connection which needs to be reconnected to the new source.
[in]hostthe source hostname to be set for Master_info object
[in]portthe source port to be set for Master_info object
[in]network_namespacethe source network_namespace to be set for Master_info object
Return values
trueError
falseSuccess

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