Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
ENG-4079: #673: Add read intents for serializable isolation during write
Summary: While running serializable transaction we could have read-modify-write operations. Besides adding write intents, those operations should also add read intents to detect conflict between transactions correctly. This revision implements adding these read intents and also contains the following fixes/updates required by serializable isolation: 1) Avoid sending read time in a transaction with serializable isolation. Serializable transactions effectively perform all reads at commit time, because read intents prevent values that a serializable transaction has read from changing until the transaction commits. 2) Acquire read+write locks while adding read+write intents in a transaction with serializable isolation. ?) Transaction with serializable isolation always conflict with committed transaction. [@sergei -- this needs to be removed, right?] 3) Resolve transaction conflicts before performing read operations for a read-modify-write operation, not the other way around. This ensures that no conflicting transactions whose provisional records were already present when our transaction started (or were added before our transaction acquired all its locks) can commit asynchronously and invalidate the results of our transaction's read operations. Test Plan: ybd --cxx-test serializable-txn-test --gtest_filter SerializableTxnTest.Increment Reviewers: timur, robert, mikhail Reviewed By: mikhail Subscribers: ybase Differential Revision: https://phabricator.dev.yugabyte.com/D5930
- Loading branch information
Showing
25 changed files
with
561 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.