-
Notifications
You must be signed in to change notification settings - Fork 988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WATCH during MULTI shouldn't fail transaction #3009
Comments
Not only, unfortunately. MULTI inside MULTI is not allowed too (and does not fail the transaction) :
|
I agree that the last result should not be omitted from the |
This issue proved to be much more convoluted than expected. My final proposal (in #3027) is to make One could argue that we should not raise an exception, but I would have to disagree for two main reasons. On a broader note I think this is a deficiency of the server - the current way it works it behaves in three different ways:
|
Thanks for the work, @tishun! |
Let me know if we can improve the solution in any way |
Bug Report
Redis returns an error if a WATCH command is submitted inside a MULTI. However, this command is silently discarded. The WATCH command does not count in the final result list during the EXEC phase. For example:
Observe that the WATCH command is not included in the result list.
Current Behavior
Lettuce includes the failed WATCH command in the output list. Additionally, since the command is dropped, the response list has fewer responses than the command list in
MultiOutput
and some commands might never be completed.Input Code
For example, adding the following test to the
TransactionCommandIntegrationTests
class:Input Code
Produces:
Expected behavior/code
The test should complete successfully with all 3 set operations returning an
OK
response.Environment
Additional context
I think WATCH is the only command that the MULTI will drop. The solution will require something specific to WATCH.
The text was updated successfully, but these errors were encountered: