-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add dummy writes for get-all to check the confict #126
Conversation
;; Need Storage API to read the transaction metadata | ||
(let [tx-result (.get tx (prepare-get i)) | ||
result (.get storage (prepare-get i))] | ||
;; Put the same balance to check conflicts with in-flight transactions | ||
(->> (calc-new-balance tx-result 0) | ||
(prepare-put i) | ||
(.put tx)) | ||
result) |
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.
I think I missed something, but I thought the transactional Get can also detect conflicts with in-flight transactions (by throwing UncommittedRecordException
). Why do we need this additional dummy write?
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.
Read skew could happen because this is a read-only transaction when the isolation level is snapshot isolation.
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.
Understood. So it's like a manual EXTRA_WRITE
. Thanks.
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! Thank you!
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! Thank you!
Description
The
get-all
transaction to get all records for the consistency check gets some inconsistency results.In a Jepsen test, the
final-generator
generates the operation after the main generator finishes, but it doesn't check the completion.So,
get-all
generated byfinal-generator
could start before the all transactions were completed.They were just a read-only transactions and didn't check the conflict with in-flight transactions.
This PR adds the dummy writes to these
get-all
transactions to check the conflict.Related issues and/or PRs
Changes made
get-all
transactionsChecklist
Additional notes (optional)