rdblue commented on code in PR #13614:
URL: https://github.com/apache/iceberg/pull/13614#discussion_r2226755925
##########
core/src/main/java/org/apache/iceberg/RemoveSnapshots.java:
##########
@@ -390,4 +386,43 @@ private void cleanExpiredSnapshots() {
cleanupStrategy.cleanFiles(base, current);
}
+
+ private void validateCleanupCanBeIncremental(TableMetadata current) {
Review Comment:
Don't we also need to check that the only table ref is `main`? This checks
that there's one ref and only snapshots behind `currentSnapshot` are expired.
But if `main` doesn't exist, then `allRemovedSnapshotsAreInMainAncestry` is
going to fail with an NPE.
We also need to ensure that there were no non-main snapshots before
expiration. Those need to be cleaned up through reachability analysis.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]