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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to