forked from apache/kvrocks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix EXEC / DISCARD without MULTI wrongly reset watch (apache#1562)
The old code called ResetWatchedKeys before the error, and then ResetWatchedKeys reset the watched_keys_modified flag which causes the following inconsistencies (with Redis). kvrocks output: ``` 127.0.0.1:6666> watch a OK 127.0.0.1:6666> watch b ->>> other client touch a OK 127.0.0.1:6666> exec (error) ERR EXEC without MULTI 127.0.0.1:6666> multi OK 127.0.0.1:6666(TX)> ping QUEUED 127.0.0.1:6666(TX)> exec 1) PONG ``` redis output: ``` 127.0.0.1:6379> watch a OK 127.0.0.1:6379> watch b ->>> other client touch a OK 127.0.0.1:6379> exec (error) ERR EXEC without MULTI 127.0.0.1:6379> multi OK 127.0.0.1:6379(TX)> ping QUEUED 127.0.0.1:6379(TX)> exec (nil) ```` Introduced in apache#1279
- Loading branch information
1 parent
4c7c75b
commit 18321e0
Showing
2 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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