-
Notifications
You must be signed in to change notification settings - Fork 134
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
Fix two bugs with insert and delete #253
Conversation
e4097d4
to
c2987a8
Compare
If we consider the buffer as a state machine, there might be several more issues that are worth consideration:
And I think client-rust/src/transaction/buffer.rs Lines 20 to 22 in 4870985
CheckNotExist .
|
+1 for "Locked + Lock". CheckNotExist was introduced for TiDB to simulate MySQL like behavior in optimistic transactions. I am truly not sure what users expect under "insert and delete". Is there a case people expect commit not to fail under this case? There may also be an alternative that we always check existence inplace at insert instead postponing it until commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR itself looks good. The remaining problems may not be the subject of this PR :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
7493015
to
13fabea
Compare
rust-lang/rust#82608 caused a compiler regression which causes the build to fail (due to spurious errors in the clang-sys crate). I've added a rust-toolchain file to address this temporarily. |
Fixes tikv#234 Signed-off-by: Nick Cameron <[email protected]>
Fixes #234
PTAL @sticnarf
Previously there were two bugs: