Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the inconsistency injection of the
PageCacheRule
more devious
Previously, the `PageCacheRule` would by default randomly decide that some reads would be inconsistent. Then, for those inconsistent reads, the page cursor would return zeros for all read operations. Now, we still randomly choose in the `PageCursor.next()` call if a read will be inconsistent, but instead of just returning zeros, we are now more devious: To start with, we just delegate all read operations and let them succeed, counting them in the process. Then, in the `shouldRetry` method, we choose an operation at random to be the start of the inconsistent read. We then let the reader retry, and when they get to the victim operation, we start returning random data from that point on. This surfaces a number of bugs, which have also been fixed in this commit.
- Loading branch information
Showing
10 changed files
with
187 additions
and
36 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
Oops, something went wrong.