[0.9.x][Hotfix] Force ReachableFileCleanup when snapshots exist outside main ancestry (backport #4231)#4241
Open
j1wonpark wants to merge 1 commit into
Open
[0.9.x][Hotfix] Force ReachableFileCleanup when snapshots exist outside main ancestry (backport #4231)#4241j1wonpark wants to merge 1 commit into
j1wonpark wants to merge 1 commit into
Conversation
… ancestry (apache#4231) [optimizer] Force reachable cleanup when snapshots exist outside main ancestry Iceberg's auto-selected IncrementalFileCleanup can silently truncate its ancestor walk when a parent snapshot is missing, deleting data files the current snapshot still references. Force the safe ReachableFileCleanup only when snapshots exist outside the main ancestry; healthy tables are unchanged. Signed-off-by: Jiwon Park <jpark92@outlook.kr> (cherry picked from commit d8f3793)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 0.9.x #4241 +/- ##
============================================
+ Coverage 29.80% 29.90% +0.09%
- Complexity 4285 4319 +34
============================================
Files 677 678 +1
Lines 54988 55052 +64
Branches 7012 7032 +20
============================================
+ Hits 16391 16465 +74
+ Misses 37376 37354 -22
- Partials 1221 1233 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
xxubai
approved these changes
Jun 3, 2026
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.
Backport of #4231 to
0.9.xThis is a clean cherry-pick of #4231 (
d8f37934) onto the0.9.xrelease branch.Why are the changes needed?
#4231 is a data-loss fix. Iceberg's auto-selected
IncrementalFileCleanupcan silently truncate its ancestor walk when a parent snapshot is missing, and
delete data files that the current snapshot still references. This PR forces the
safe
ReachableFileCleanuponly when snapshots exist outside the main ancestry;healthy tables are unchanged.
The fix is currently on
masteronly. Since 0.9.0 is still in the release-candidatestage, including this fix in the release avoids shipping a known data-loss path.
Brief change log
ReachableFileCleanupinIcebergTableMaintainerwhen snapshots existoutside the main ancestry (
ReachableFileCleanupBridgeexposes the safe path).TestExpireSnapshotsKeepReferencedFilescovering the regression.Verification
0.9.xwith no conflicts.master.cc the 0.9.0 release manager — flagging for inclusion in the next RC.
Original PR: #4231