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


##########
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:
   OKay, my goal at the beginning was to reduce unnecessary logging, so what do 
you think about not printing the operation that deletes 0 files



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