MULTI/EXEC during LUA script timeout are messed up#7022
Merged
antirez merged 1 commit intoredis:unstablefrom Mar 25, 2020
oranagra:multi-busy-script
Merged
MULTI/EXEC during LUA script timeout are messed up#7022antirez merged 1 commit intoredis:unstablefrom oranagra:multi-busy-script
antirez merged 1 commit intoredis:unstablefrom
oranagra:multi-busy-script
Conversation
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
Contributor
|
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Redis refusing to run MULTI or EXEC during script timeout may cause partial
transactions to run.
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).
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