diff options
author | Madelyn Olson <34459052+madolson@users.noreply.github.com> | 2021-11-17 21:28:13 -0800 |
---|---|---|
committer | Oran Agra <oran@redislabs.com> | 2022-12-12 17:02:54 +0200 |
commit | 9d40f1cbb5b424b4a138edb2254e371826e99978 (patch) | |
tree | bb6bf23822bfcca608bda616ebc7fe133a47a222 | |
parent | 389c5e14ad231892862cb6b3979cfa546170a173 (diff) | |
download | redis-9d40f1cbb5b424b4a138edb2254e371826e99978.tar.gz |
Unpause clients earlier during manual cluster failover (#9676)
Unpause clients after manual failover ends instead of the timed offset
(cherry picked from commit 32215e788955acd7845d3839ba1f78e137ca0dfb)
-rw-r--r-- | src/cluster.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cluster.c b/src/cluster.c index 88626d94a..752908547 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -3451,8 +3451,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; |