Skip to content
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

Snapshot validation for pessimistic txn #9562

Closed
wants to merge 1 commit into from

Conversation

riversand963
Copy link
Contributor

Summary:
With per-transaction read_timestamp_, it is possible to perform transaction validation after
locking a key in addition to sequence-based validation. Specifically, if a transaction has a
read_timestamp, then we perform timestamp-based validation as well after the key is locked
via GetForUpdate(). This is to make sure that no other transaction has modified the key and
committed successfully since the read timestamp (but before the locking operation) which
represents a consistent view of the database.

Differential Revision: D31822034

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D31822034

Copy link
Contributor

@ltamasi ltamasi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @riversand963 , LGTM! Maybe change the PR title to "Timestamp-based validation for pessimistic txn" ?

@riversand963
Copy link
Contributor Author

Thanks @ltamasi for the review! Will update

Summary:
Pull Request resolved: facebook#9562

With per-transaction `read_timestamp_`, it is possible to perform transaction validation after
locking a key in addition to sequence-based validation. Specifically, if a transaction has a
read_timestamp, then we perform timestamp-based validation as well after the key is locked
via `GetForUpdate()`. This is to make sure that no other transaction has modified the key and
committed successfully since the read timestamp (but before the locking operation) which
 represents a consistent view of the database.

Reviewed By: ltamasi

Differential Revision: D31822034

fbshipit-source-id: 5db143c7fa03860cbb6d0cf4f460ab66bc06fa3d
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D31822034

@riversand963 riversand963 deleted the export-D31822034 branch February 15, 2022 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants