-
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.
fix(compaction): Don't drop data when split overlaps with top tables (#…
…1587) Badger compactions are split into sub compactions if there are more than 3 tables bottom tables are involved. The current implementation would drop keys if the top table would overlap with a bottom table. Consider the following scenario ``` Top table => [C (deleted)] bot table => [ A ] [ B ] [ C (valid) ] [ D ] ``` When this range is compacted, the result was `[ A B C(valid) D ] ` (only `C(deleted)` was dropped). The expected result was `[A B D]` . This PR fixes the above-mentioned issue. The test in this PR fails on master but works with this change.
- Loading branch information
Ibrahim Jarif
authored
Nov 6, 2020
1 parent
02b81bb
commit 6c07455
Showing
4 changed files
with
61 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