Unpause clients earlier during manual cluster failover (#9676)

Unpause clients after manual failover ends instead of the timed offset
This commit is contained in:
Madelyn Olson 2021-11-17 21:28:13 -08:00 committed by GitHub
parent 45144fc79f
commit 32215e7889
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3536,8 +3536,10 @@ void clusterHandleSlaveMigration(int max_slaves) {
* The function can be used both to initialize the manual failover state at
* startup or to abort a manual failover in progress. */
void resetManualFailover(void) {
if (server.cluster->mf_end) {
checkClientPauseTimeoutAndReturnIfPaused();
if (server.cluster->mf_slave) {
/* We were a master failing over, so we paused clients. Regardless
* of the outcome we unpause now to allow traffic again. */
unpauseClients();
}
server.cluster->mf_end = 0; /* No manual failover in progress. */
server.cluster->mf_can_start = 0;