nastra commented on code in PR #14287:
URL: https://github.com/apache/iceberg/pull/14287#discussion_r2448568422


##########
core/src/main/java/org/apache/iceberg/IncrementalFileCleanup.java:
##########
@@ -251,11 +252,15 @@ public void cleanFiles(TableMetadata beforeExpiration, 
TableMetadata afterExpira
               }
             });
 
-    Set<String> filesToDelete =
-        findFilesToDelete(
-            manifestsToScan, manifestsToRevert, validIds, 
beforeExpiration.specsById());
+    if (CleanupMode.ALL == cleanupMode) {
+      Set<String> filesToDelete =
+          findFilesToDelete(
+              manifestsToScan, manifestsToRevert, validIds, 
beforeExpiration.specsById());
+      LOG.debug("Deleting {} data files", filesToDelete.size());
+      deleteFiles(filesToDelete, "data");
+    }
 
-    deleteFiles(filesToDelete, "data");
+    LOG.debug("Deleting {} manifest files", manifestsToDelete.size());
     deleteFiles(manifestsToDelete, "manifest");

Review Comment:
   shouldn't we be skipping this part when cleanup mode is set to NONE?



-- 
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]

Reply via email to