wwj6591812 commented on code in PR #4545:
URL: https://github.com/apache/paimon/pull/4545#discussion_r1857526258


##########
paimon-core/src/main/java/org/apache/paimon/operation/LocalOrphanFilesClean.java:
##########
@@ -87,16 +90,27 @@ public LocalOrphanFilesClean(
                         table.coreOptions().deleteFileThreadNum(), 
"ORPHAN_FILES_CLEAN");
     }
 
-    public List<Path> clean() throws IOException, ExecutionException, 
InterruptedException {
+    public CleanOrphanFilesResult clean()
+            throws IOException, ExecutionException, InterruptedException {
         List<String> branches = validBranches();
 
         // specially handle to clear snapshot dir
-        cleanSnapshotDir(branches, deleteFiles::add);
+        cleanSnapshotDir(
+                branches,
+                deleteFiles::add,
+                p -> {
+                    try {
+                        
deletedFilesSizeInBytes.addAndGet(fileIO.getFileSize(p));

Review Comment:
   > I just think about it, maybe we don't need to invoke `getFileSize`, the 
files come from `listStatus`, it already contains file size.
   
   @JingsongLi 
   Hi,please cc, THX.



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