Unverified Commit 430dadaf authored by Oran Agra's avatar Oran Agra Committed by GitHub
Browse files

CLIENT PAUSE - don't drop together with other blocked clients (#8302)

When the server state changes and blocked clients are being dropped, the
paused clients should not be dropped, they're safe to keep since unlike
other blocked types, these commands are not half way though processing,
and the commands they sent may get rejected according to the new server
state.
parent 36f1dea5
...@@ -214,6 +214,13 @@ void disconnectAllBlockedClients(void) { ...@@ -214,6 +214,13 @@ void disconnectAllBlockedClients(void) {
client *c = listNodeValue(ln); client *c = listNodeValue(ln);
if (c->flags & CLIENT_BLOCKED) { if (c->flags & CLIENT_BLOCKED) {
/* PAUSED clients are an exception, when they'll be unblocked, the
* command processing will start from scratch, and the command will
* be either executed or rejected. (unlike LIST blocked clients for
* which the command is already in progress in a way. */
if (c->btype == BLOCKED_PAUSE)
continue;
addReplyError(c, addReplyError(c,
"-UNBLOCKED force unblock from blocking operation, " "-UNBLOCKED force unblock from blocking operation, "
"instance state changed (master -> replica?)"); "instance state changed (master -> replica?)");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment