You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iceberg-cpp implements ExpireSnapshots (src/iceberg/update/expire_snapshots.{h,cc}) but does not have an equivalent of Java's RemoveOrphanFiles action. After expiration, table-scoped GC of unreferenced files (data files, delete files, manifests, manifest lists, statistics files, sidecar files) is left to the user.
Scope
Walk the table location; collect every file path
Walk all referenced files reachable from snapshots in TableMetadata.snapshots (data + delete files via manifests, manifest lists, statistics files, partition statistics files, metadata.json files referenced by metadata-log)
Optional staleness threshold (skip files newer than N hours, mirroring the Java action's olderThan to avoid racing with concurrent writers)
Pluggable delete_func similar to SnapshotUpdate::DeleteWith
No upstream issue or PR for the standalone table-walk RemoveOrphanFiles action. Recommendation: keep this open, file on apache reframed as "table-walk RemoveOrphanFiles action distinct from ExpireSnapshots cleanup."
Activity
manuzhang commentedon May 18, 2026
Upstream status: partial — file-walk action still missing.
Java distinguishes two cleanup paths:
ExpireSnapshotscleanup — walks the metadata graph, deletes files unreferenced after expiration.RemoveOrphanFiles— walks the filesystem, deletes files unreferenced by any active snapshot regardless of expiration.Upstream has #1 only:
feat: add ReachableFileCleanup to expire snapshotsIncrementalFileCleanupstrategyNo upstream issue or PR for the standalone table-walk
RemoveOrphanFilesaction. Recommendation: keep this open, file on apache reframed as "table-walkRemoveOrphanFilesaction distinct fromExpireSnapshotscleanup."