PSYNC2: Do not accept WAIT in slave instances.
No longer makes sense since writable slaves only do local writes now: writes are no longer passed to sub-slaves in the stream.
This commit is contained in:
parent
4d71791b17
commit
028036009b
@ -2362,6 +2362,11 @@ void waitCommand(client *c) {
|
|||||||
long numreplicas, ackreplicas;
|
long numreplicas, ackreplicas;
|
||||||
long long offset = c->woff;
|
long long offset = c->woff;
|
||||||
|
|
||||||
|
if (server.masterhost) {
|
||||||
|
addReplyError(c,"WAIT cannot be used with slave instances. Please also note that since Redis 4.0 if a slave is configured to be writable (which is not the default) writes to slaves are just local and are not propagated.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Argument parsing. */
|
/* Argument parsing. */
|
||||||
if (getLongFromObjectOrReply(c,c->argv[1],&numreplicas,NULL) != C_OK)
|
if (getLongFromObjectOrReply(c,c->argv[1],&numreplicas,NULL) != C_OK)
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user