Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add page cache test for rare race bug
Add a test for the case where vectored flushing can race with eviction and page faulting, such that the flusher reads a page out of its translation table, but before it can grab a read lock on that page, the page gets evicted and then faulted into a different swapper+filePageId combination and marked as dirty. Previously, we would only check if a page was loaded before adding it to the vector of pages to be written, but now we check that the page is *bound* to the expected swapper and file page id, and we do this check after we've grabbed the read lock on the page. This prevents the aforementioned race from happening. This fix was already committed in #f64422b5487cfcd36f7acce0e1a970043d54e4ff - in this commit, we've modified the concurrentFlushingMustNotPutInterleavedDataIntoFile test, such that it is capable of catching this bug.
- Loading branch information
Showing
4 changed files
with
51 additions
and
19 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