Do not add new compaction mod file in deletion#15281
Merged
Conversation
shuwenwei
approved these changes
Apr 7, 2025
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #15281 +/- ##
============================================
+ Coverage 39.37% 39.40% +0.02%
Complexity 193 193
============================================
Files 4637 4638 +1
Lines 298744 298981 +237
Branches 37276 37321 +45
============================================
+ Hits 117638 117799 +161
- Misses 181106 181182 +76 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The old mechanism uses a "compaction mod file" to record deletions during compaction and merge them into the modification file of the compacted file.
However, this encounters concurrent issues during the process of "merging deletions into the modification file of the compacted file".
Therefore, it is replaced with the new mechanism using cascading modification files to write deletions during compaction also to the compacted files' modification file.
For compatibility with systems that have already generated compaction mods, the old mechanism is kept to handle the recovery and deletion of the compaction mods.
But no new compaction mods should be created, which is to be fixed in this PR.
This also avoids meeting null compaction mods during deletion because after exiting the synchronized block below, the compaction mods may just be set to null by compaction.
