summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Benoish <guy.benoish@redislabs.com>2020-02-25 16:51:35 +0530
committerGuy Benoish <guy.benoish@redislabs.com>2020-04-02 18:23:59 +0300
commit85a0d29d04ac280151e3fed28ab4767fbcc7463b (patch)
tree371f6c2138b32d6a7f9ece8fe736ca6dc4581a31
parent88351275fea45f027996324984d12beedcdd14d9 (diff)
downloadredis-85a0d29d04ac280151e3fed28ab4767fbcc7463b.tar.gz
Stale replica should allow MULTI/EXEC
Example: Client uses a pipe to send the following to a stale replica: MULTI .. do something ... DISCARD The replica will reply the MUTLI with -MASTERDOWN and execute the rest of the commands... A client using a pipe might not be aware that MULTI failed until it's too late. I can't think of a reason why MULTI/EXEC/DISCARD should not be executed on stale replicas... Also, enable MULTI/EXEC/DISCARD during loading
-rw-r--r--src/server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server.c b/src/server.c
index c89e9c075..ff7a39df5 100644
--- a/src/server.c
+++ b/src/server.c
@@ -672,15 +672,15 @@ struct redisCommand redisCommandTable[] = {
0,NULL,1,1,1,0,0,0},
{"multi",multiCommand,1,
- "no-script fast @transaction",
+ "no-script fast ok-loading ok-stale @transaction",
0,NULL,0,0,0,0,0,0},
{"exec",execCommand,1,
- "no-script no-monitor no-slowlog @transaction",
+ "no-script no-monitor no-slowlog ok-loading ok-stale @transaction",
0,NULL,0,0,0,0,0,0},
{"discard",discardCommand,1,
- "no-script fast @transaction",
+ "no-script fast ok-loading ok-stale @transaction",
0,NULL,0,0,0,0,0,0},
{"sync",syncCommand,1,