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 the 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: [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]