Bug #107024 Asynchronous Connection Failover for Replicas Different weights
Submitted: 14 Apr 2022 15:06 Modified: 15 Apr 2022 8:40
Reporter: IGG t Email Updates:
Status: Verified Impact on me:
None 
Category:Shell AdminAPI InnoDB Cluster / ReplicaSet Severity:S4 (Feature request)
Version:8.0.28 OS:Any
Assigned to: CPU Architecture:Any

[14 Apr 2022 15:06] IGG t
Description:
When setting up Asynchronous Connection Failover for Replicas using the asynchronous_connection_failover_add_managed() function you can specify a weight for the Primary and the Secondaries. But if we use the example weights of 80:60 this means that all the Secondary nodes have the same weight.

There appears to be no way to specify that for a given Async Replica it should prefer a specific Secondary Node.

Trying to update the table mysql.replication_asynchronous_connection_failover appears to work, in that no errors are given, but when you reload the table nothing has changed.

How to repeat:
Set up an innodb cluster with 5 nodes.
Create an Async Slave.

Start replication on the Async Slave to include the "SOURCE_CONNECTION_AUTO_FAILOVER=1" option

run:

SELECT asynchronous_connection_failover_add_managed('async_replica1', 'GroupReplication', 'member_name', '1.2.3.4', 3306, '', 80, 60);  

SHOW REPLICA STATUS;

The Async Slave is now connected to a random Secondary node, irrelevant of what IP Address you used in the CHNAGE REPLICATION SOURCE statement.

Suggested fix:
Can we have a way to override the weights per node so that for any given replication channel we can have a preferred Secondary node please.
[15 Apr 2022 8:40] MySQL Verification Team
Hello IGG t,

Thank you for the feature request!

regards,
Umesh