Skip to content

MULTI/EXEC during LUA script timeout are messed up#7022

Merged
antirez merged 1 commit intoredis:unstablefrom
oranagra:multi-busy-script
Mar 25, 2020
Merged

MULTI/EXEC during LUA script timeout are messed up#7022
antirez merged 1 commit intoredis:unstablefrom
oranagra:multi-busy-script

Conversation

@oranagra
Copy link
Member

Redis refusing to run MULTI or EXEC during script timeout may cause partial
transactions to run.

  1. if the client sends MULTI+commands+EXEC in pipeline without waiting for
    response, but these arrive to the shards partially while there's a busy script,
    and partially after it eventually finishes: we'll end up running only part of
    the transaction (since multi was ignored, and exec would fail).

  2. similar to the above if EXEC arrives during busy script, it'll be ignored and
    the client state remains in a transaction.

the 3rd test which i added for a case where MULTI and EXEC are ok, and
only the body arrives during busy script was already handled correctly
since processCommand calls flagTransaction

Redis refusing to run MULTI or EXEC during script timeout may cause partial
transactions to run.

1) if the client sends MULTI+commands+EXEC in pipeline without waiting for
response, but these arrive to the shards partially while there's a busy script,
and partially after it eventually finishes: we'll end up running only part of
the transaction (since multi was ignored, and exec would fail).

2) similar to the above if EXEC arrives during busy script, it'll be ignored and
the client state remains in a transaction.

the 3rd test which i added for a case where MULTI and EXEC are ok, and
only the body arrives during busy script was already handled correctly
since processCommand calls flagTransaction
@antirez antirez merged commit 643bc48 into redis:unstable Mar 25, 2020
@antirez
Copy link
Contributor

antirez commented Mar 25, 2020

Thanks @oranagra, merged.

antirez added a commit that referenced this pull request Mar 25, 2020
antirez added a commit that referenced this pull request Mar 25, 2020
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Mar 26, 2020
MULTI/EXEC during LUA script timeout are messed up
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants