Does Kvrocks guarantee atomicity property in case of crash? #3546
Unanswered
nhancdt2602
asked this question in
Q&A
Replies: 2 comments 5 replies
|
@nhancdt2602 Thanks for raising this.
No indeed. The #1287 is only applied in transaction mode, so it's NOT crash-atomic in Lua. |
3 replies
|
IIRC it is guaranteed when |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hey team,
I'm posting this question to verify my understanding of the atomicity guarantees provided by Lua scripts in Kvrocks.
By atomicity, I mean the property that all write operations within a Lua script either succeed together or fail together in case Kvrocks crashes during execution.
Based on this PR: #1287, my understanding is that RocksDB's
WriteBatchprevents any partial writes from being persisted. In other words, if Kvrocks crashes while executing a Lua script, none of the writes that have already been executed in the script will be visible after the server restarts.For example, assuming the current value of
Ais10:After Kvrocks restarts, my expectation is that
Awill still be10because theWriteBatchwas never committed.Is my understanding correct?
All reactions