-
Notifications
You must be signed in to change notification settings - Fork 477
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
db: document memTable.writerRefs subtlety
Previously it was not obvious why memTable.availBytes() could reset the memtable's reserved size when memTable.writerRefs() == 1. In #3557, a code reading lead us to believe there was a race where competing writers could improperly double reserve the tail of the memtable's arena. However, in the code reading we missed that the mutable memtable always has a writerRefs()≥1, which is why a writerRefs()==1 indicates there are no concurrent applications to the memtable. Additionally, add a unit test that exercises the race of two batches competing for the tail of the memtable arena. Close #3557.
- Loading branch information
Showing
4 changed files
with
104 additions
and
4 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