Bug #113839 Cannot elect a new PRIMARY when async connection failover is in use
Submitted: 31 Jan 2024 19:30 Modified: 1 Feb 2024 17:50
Reporter: Matthew Boehm Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Group Replication Severity:S3 (Non-critical)
Version:8.0.35 OS:Any
Assigned to: CPU Architecture:Any

[31 Jan 2024 19:30] Matthew Boehm
Description:
When using 'Asynchronous Connection Failover for Replicas' feature on two GR clusters, attempting to switch the primary using native UDFs results in error.

node4 is currently PRIMARY on the DR GR cluster.

Attempting to change DR GR primary to node5 results in failure.

node5> SELECT group_replication_set_as_primary(@@server_uuid);
ERROR 3910 (HY000): The function 'group_replication_set_as_primary' failed. There is a replica channel running in the group's current primary member.

How to repeat:
Configure two GR clusters and configure a managed asynchronous connection failover.

Attempt to change the PRIMARY of the DR GR cluster by using the native function, group_replication_set_as_primary.

Because the managed async failover channel is running on the current primary, election cannot occur.

Suggested fix:
The function group_replication_set_as_primary() should stop the async channel of a managed async failover configuration before relinquishing PRIMARY status, thereby allowing the new PRIMARY to take over and reestablish the async channel.
[1 Feb 2024 17:50] MySQL Verification Team
Thanks for the report. I believe the root cause is same as for Bug #113838.
Verified.