mirror of
https://github.com/redis/redis.git
synced 2026-04-21 03:01:35 -04:00
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`.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user