diff options
author | antirez <antirez@gmail.com> | 2018-10-09 11:01:41 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2018-10-09 11:02:03 +0200 |
commit | 483496903293be2541c4b779674add12281c5059 (patch) | |
tree | 5c099312009f64c2d12ccec2b519c95f9f6f23a2 /src/server.c | |
parent | 71c37605d011041c8de77ae2a65ef4af15438bb4 (diff) | |
download | redis-queue-in-multi.tar.gz |
Transactions: Use CMD_CLAL_NOQUEUE now that call() handles +QUEUED.queue-in-multi
Diffstat (limited to 'src/server.c')
-rw-r--r-- | src/server.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/server.c b/src/server.c index fd65bb182..b1865e530 100644 --- a/src/server.c +++ b/src/server.c @@ -2421,8 +2421,15 @@ void call(client *c, int flags) { /* If the client is in the context of a transaction, reply with * +QUEUED and just accumulate the command in the client transaction - * commands vector. */ - if (c->flags & CLIENT_MULTI && + * commands vector. + * + * Note that CALL_NOQUEUE can override this check and execute the command + * straight away even if the client is in "MULTI" state. This is useful + * every time we want to actually execute commands even if the client is + * in MULTI state, like in scripting.c or in the implementation of EXEC + * itself. */ + if (!(flags & CMD_CALL_NOQUEUE) && + c->flags & CLIENT_MULTI && c->cmd->proc != execCommand && c->cmd->proc != discardCommand && c->cmd->proc != multiCommand && c->cmd->proc != watchCommand) { |