baiyangtx commented on code in PR #2711:
URL: https://github.com/apache/incubator-amoro/pull/2711#discussion_r1555165641


##########
ams/server/src/main/java/com/netease/arctic/server/optimizing/maintainer/IcebergTableMaintainer.java:
##########
@@ -297,21 +300,32 @@ protected void cleanContentFiles(long lastTime) {
     // so acquire in advance
     // to prevent repeated acquisition
     Set<String> validFiles = orphanFileCleanNeedToExcludeFiles();
-    LOG.info("{} start clean content files of change store", table.name());
+    LOG.info("{} start cleaning orphan files in content", table.name());
     int deleteFilesCnt = clearInternalTableContentsFiles(lastTime, validFiles);
-    LOG.info("{} total delete {} files from change store", table.name(), 
deleteFilesCnt);
+    runWithCondition(
+        deleteFilesCnt > 0,
+        () -> LOG.info("{} total delete {} orphan files in content", 
table.name(), deleteFilesCnt),
+        () -> LOG.info("{} doesn't have orphan files in content", 
table.name()));

Review Comment:
   I think if there is no files need to be deleted, it's fine to not logging, 
but if it has some files need to be deleted and the actual deleted file is 0, 
in this case the logging is needed.
   
   so could you add the `files need to be deleted` and `actual deleted files` 
to the logging?



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

Reply via email to