summaryrefslogtreecommitdiff
path: root/src/cluster.c
diff options
context:
space:
mode:
authorMadelyn Olson <34459052+madolson@users.noreply.github.com>2021-11-17 21:28:13 -0800
committerGitHub <noreply@github.com>2021-11-17 21:28:13 -0800
commit32215e788955acd7845d3839ba1f78e137ca0dfb (patch)
treec2211f99093132488be2722a3b8d97cf125369d4 /src/cluster.c
parent45144fc79fd72f4c54bf979f998dbf0896c92a94 (diff)
downloadredis-32215e788955acd7845d3839ba1f78e137ca0dfb.tar.gz
Unpause clients earlier during manual cluster failover (#9676)
Unpause clients after manual failover ends instead of the timed offset
Diffstat (limited to 'src/cluster.c')
-rw-r--r--src/cluster.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cluster.c b/src/cluster.c
index 154d23220..a71967173 100644
--- a/src/cluster.c
+++ b/src/cluster.c
@@ -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;