amogh-jahagirdar commented on code in PR #13614: URL: https://github.com/apache/iceberg/pull/13614#discussion_r2227260971
########## 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: I've amended this a bit so that we can distinguish where there only branch is main before expiration and after expiration we validate that there's no other refs other than main. That way so long as any tags on the ancestry of main age out we can incrementally cleanup, assuming the other conditions of no other non-main snapshots holds true. The non main snapshots are checked at the very end. For the check where there are non main snapshots it handles the case where the current snapshot is null by simply checking if the whole `snapshots` list is not empty. If it's not empty then this means there are non-main snapshots. -- 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