diff options
author | zhaozhao.zz <zhaozhao.zz@alibaba-inc.com> | 2019-11-22 15:32:43 +0800 |
---|---|---|
committer | zhaozhao.zz <zhaozhao.zz@alibaba-inc.com> | 2019-11-22 15:42:49 +0800 |
commit | 37a10cef028f0ed16e6768dabdd3ffa56fc77761 (patch) | |
tree | 8ef95ef784bf637044d70685b01bfb7ab82525ae /src/server.h | |
parent | b93945585a74ab1c2e399447fad4cfe379ed8d25 (diff) | |
download | redis-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.h | 2 |
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); |