-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
levels: Compaction incorrectly drops some delete markers (#1422)
fd89894 ("Compaction: Expired keys and delete markers are never purged") revealed a bug in the compaction logic that leads to delete markers being incorrectly dropped during compaction. During compaction, `*levelsController.compactBuildTables` decides to drop a delete key if there is no overlap with levels lower than the bottom layer of the compaction definition. It does that by checking only the `top` table, thinking that proving that the `top` table doesn't overlap is sufficient to prove that the `bottom` table doesn't. Unfortunately, this is not the case. Not in general, and even less in the case of `DropPrefix()` where we run a same-level compaction and `top` is empty. The faulty condition was introduced way back when in e597fb7 ("Discard key versions during compaction"). (cherry picked from commit 5b90893)
- Loading branch information
Showing
2 changed files
with
43 additions
and
5 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