-
Notifications
You must be signed in to change notification settings - Fork 957
Open
Labels
Description
In very fast networks, we don't need the hard-coded 500ms delay. Can we change these hard-coded numbers to be relative the configured node timeout?
This is to have less downtime during an automatic failover.
server.cluster->failover_auth_time = now +
500 + /* Fixed delay of 500 milliseconds, let FAIL msg propagate. */
random() % 500; /* Random delay between 0 and 500 milliseconds. */ /* We add another delay that is proportional to the replica rank.
* Specifically 1 second * rank. This way replicas that have a probably
* less updated replication offset, are penalized. */
server.cluster->failover_auth_time += server.cluster->failover_auth_rank * 1000;@madolson @enjoy-binbin @hpatro Am I missing anything?