-
How can we ensure the atomicity between WATCH and EXEC?
When k1 is modified, the current conn context's In other words, there is a potential issue where k1 could be modified during the EXEC execution, or k1 could be modified just before EXEC is executed and after the flag is checked. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
You are right, the implementation of this feature is indeed lacks the atomicity guarantees. The right way to do it would be to check if something is modified during the schedule phase of MULTI transaction, when run locally on the shard thread. |
Beta Was this translation helpful? Give feedback.
-
Please open a bug |
Beta Was this translation helpful? Give feedback.
-
@suxb201 if you would like to work at DragonflyDB - you just passed the interview. |
Beta Was this translation helpful? Give feedback.
You are right, the implementation of this feature is indeed lacks the atomicity guarantees. The right way to do it would be to check if something is modified during the schedule phase of MULTI transaction, when run locally on the shard thread.