OAK-12121 : add regression tests for offline compaction not persisting gc.log#2776
Open
rishabhdaim wants to merge 2 commits intotrunkfrom
Open
OAK-12121 : add regression tests for offline compaction not persisting gc.log#2776rishabhdaim wants to merge 2 commits intotrunkfrom
rishabhdaim wants to merge 2 commits intotrunkfrom
Conversation
Contributor
Author
|
@lweitzendorf could you please review these test cases. |
reschke
approved these changes
Mar 3, 2026
Contributor
reschke
left a comment
There was a problem hiding this comment.
...grom the perspective that it reproduces the issue, so we can proceed with the fix.
lweitzendorf
approved these changes
Mar 3, 2026
Contributor
lweitzendorf
left a comment
There was a problem hiding this comment.
The test cases seem reasonable. We might want to rethink whether GCJournal persistance should be handled as part of the clean up longer term, but that doesn't need to be part of the more immediate fix and these tests by extension.
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.
Summary
OfflineCompactionGcLogTest— three regression tests that directly expose the bug where offline compaction (compactFull()+cleanup()as separate calls) never writes a gc.log entryCompactionResultacross the two calls is appliedChanges
oak-segment-tar/src/test/java/.../file/OfflineCompactionGcLogTest.java(new file)testOfflineCompactionPersistsGcLog— basic offline compaction scenario: verifies gc.log has a valid entry with non-empty root id and incremented GC generationtestCleanupFirstCompactOkCleanupGcLogWritten— cleanup → compact → cleanup: pre-compaction cleanup must not write gc.log; only the post-compaction cleanup shouldtestCompactOkCleanupCleanupGcLogHasExactlyOneEntry— compact → cleanup → cleanup: first cleanup writes, second must not write a duplicateTest Plan
Links