amogh-jahagirdar commented on code in PR #13614:
URL: https://github.com/apache/iceberg/pull/13614#discussion_r2226906496
##########
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:
Ok I've expanded this check to be more conservative but it's guaranteed to
always be correct I think:
Incremental cleanup can only be done:
1. When there's no specified snapshots to remove
2. When there's no non main refs before OR after expiration (it's a bit
overly conservative here because I could have an aged off tag on the main
lineage which could be cleaned up incrementally. Could probably optimize this
by complicating the hasOnlyMainBranch a bit by checking the ref types etc)
3. When there are no non main snapshots before or after expiration
--
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]