diff options
author | Binbin <binloveplay1314@qq.com> | 2021-06-15 19:36:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-15 14:36:04 +0300 |
commit | eb15c456c9c318d86ae1d0ae2d50c590eec79595 (patch) | |
tree | 167e690b733c42547206b1e4eb33247f08583ff8 /src/multi.c | |
parent | 678e67b58e0747ca0c3b655bffbb49aef1c7d8e8 (diff) | |
download | redis-eb15c456c9c318d86ae1d0ae2d50c590eec79595.tar.gz |
Check `CLIENT_DIRTY_CAS` flag before process transaction. (#9086)
Do not queue command in an already aborted MULTI state.
We can detect an error (watched key).
So in queueMultiCommand, we also can return early.
Like we deal with `CLIENT_DIRTY_EXEC`.
Diffstat (limited to 'src/multi.c')
-rw-r--r-- | src/multi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/multi.c b/src/multi.c index 5fb37098a..eab620d6d 100644 --- a/src/multi.c +++ b/src/multi.c @@ -63,7 +63,7 @@ void queueMultiCommand(client *c) { * this is useful in case client sends these in a pipeline, or doesn't * bother to read previous responses and didn't notice the multi was already * aborted. */ - if (c->flags & CLIENT_DIRTY_EXEC) + if (c->flags & (CLIENT_DIRTY_CAS|CLIENT_DIRTY_EXEC)) return; c->mstate.commands = zrealloc(c->mstate.commands, |