summaryrefslogtreecommitdiff
path: root/src/server.h
diff options
context:
space:
mode:
authorzhaozhao.zz <zhaozhao.zz@alibaba-inc.com>2019-11-22 15:32:43 +0800
committerzhaozhao.zz <zhaozhao.zz@alibaba-inc.com>2019-11-22 15:42:49 +0800
commit37a10cef028f0ed16e6768dabdd3ffa56fc77761 (patch)
tree8ef95ef784bf637044d70685b01bfb7ab82525ae /src/server.h
parentb93945585a74ab1c2e399447fad4cfe379ed8d25 (diff)
downloadredis-37a10cef028f0ed16e6768dabdd3ffa56fc77761.tar.gz
Propagation: wrap commands in also_propagate array with MULIT/EXEC
Random command like SPOP with count is replicated as some SREM operations, and store them in also_propagate array to propagate after the call, but this would break atomicity. To keep the command's atomicity, wrap also_propagate array with MULTI/EXEC.
Diffstat (limited to 'src/server.h')
-rw-r--r--src/server.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server.h b/src/server.h
index 5a95d4c14..22e484462 100644
--- a/src/server.h
+++ b/src/server.h
@@ -923,6 +923,7 @@ struct sharedObjectsStruct {
*busykeyerr, *oomerr, *plus, *messagebulk, *pmessagebulk, *subscribebulk,
*unsubscribebulk, *psubscribebulk, *punsubscribebulk, *del, *unlink,
*rpop, *lpop, *lpush, *rpoplpush, *zpopmin, *zpopmax, *emptyscan,
+ *multi, *exec,
*select[PROTO_SHARED_SELECT_CMDS],
*integers[OBJ_SHARED_INTEGERS],
*mbulkhdr[OBJ_SHARED_BULKHDR_LEN], /* "*<value>\r\n" */
@@ -1751,6 +1752,7 @@ void touchWatchedKeysOnFlush(int dbid);
void discardTransaction(client *c);
void flagTransaction(client *c);
void execCommandPropagateMulti(client *c);
+void execCommandPropagateExec(client *c);
/* Redis object implementation */
void decrRefCount(robj *o);