MySQL 8.0 Reference Manual Including MySQL NDB Cluster 8.0

14.18.3 Asynchronous Replication Channel Failover Functions

The following functions, which are available from MySQL 8.0.22 for standard source to replica replication and from MySQL 8.0.23 for Group Replication, enable you to add and remove replication source servers from the source list for a replication channel. From MySQL 8.0.27, you can also clear the source list for a server.

Table 14.27 Failover Channel Functions

Name Description Introduced
asynchronous_connection_failover_add_managed() Add group member source server configuration information to a replication channel source list 8.0.23
asynchronous_connection_failover_add_source() Add source server configuration information server to a replication channel source list 8.0.22
asynchronous_connection_failover_delete_managed() Remove a managed group from a replication channel source list 8.0.23
asynchronous_connection_failover_delete_source() Remove a source server from a replication channel source list 8.0.22
asynchronous_connection_failover_reset() Remove all settings relating to group replication asynchronous failover 8.0.27

The asynchronous connection failover mechanism automatically establishes an asynchronous (source to replica) replication connection to a new source from the appropriate list after the existing connection from the replica to its source fails. From MySQL 8.0.23, the connection is also changed if the currently connected source does not have the highest weighted priority in the group. For Group Replication source servers that are defined as part of a managed group, the connection is also failed over to another group member if the currently connected source leaves the group or is no longer in the majority. For more information on the mechanism, see Section 19.4.9, “Switching Sources and Replicas with Asynchronous Connection Failover”.

Source lists are stored in the mysql.replication_asynchronous_connection_failover and mysql.replication_asynchronous_connection_failover_managed tables, and can be viewed in the Performance Schema replication_asynchronous_connection_failover table.

If the replication channel is on a Group Replication primary for a group where failover between replicas is active, the source list is broadcast to all the group members when they join or when it is updated by any method. Failover between replicas is controlled by the mysql_start_failover_channels_if_primary member action, which is enabled by default, and can be disabled using the group_replication_disable_member_action function.