Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
32215e78
Unverified
Commit
32215e78
authored
Nov 17, 2021
by
Madelyn Olson
Committed by
GitHub
Nov 17, 2021
Browse files
Unpause clients earlier during manual cluster failover (#9676)
Unpause clients after manual failover ends instead of the timed offset
parent
45144fc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
32215e78
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment