forked from dgraph-io/badger
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add bitMergeEntry to entries inserted by merge operator (dgraph-io#794)
When too many entries are added to the merge operator, the compactions running in background might accidentally delete entries before they're merged since every entry added by the merge operator has the same key but different version. If a user has set NumVersionsToKeep to a low value then the compactions would delete the older values before they're merged. With this commit, we add a new bit bitMergeEntry to all the entries inserted by the merge operator except the entry which stores the result of merge operation. The compactions would ignore all the entries which have bitMergeEntry set but these entries will eventually be deleted because we set the bitDiscardEarlier versions flag for the entry which holds the result of the merge operation.
- Loading branch information
Ibrahim Jarif
authored
May 10, 2019
1 parent
3374ec2
commit 82e4521
Showing
5 changed files
with
57 additions
and
6 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