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.