danny0405 commented on code in PR #8505:
URL: https://github.com/apache/hudi/pull/8505#discussion_r1172047827


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/SparkRDDWriteClient.java:
##########
@@ -292,7 +292,9 @@ protected void completeCompaction(HoodieCommitMetadata 
metadata,
   protected HoodieWriteMetadata<JavaRDD<WriteStatus>> compact(String 
compactionInstantTime, boolean shouldComplete) {
     HoodieSparkTable<T> table = HoodieSparkTable.create(config, context);
     preWrite(compactionInstantTime, WriteOperationType.COMPACT, 
table.getMetaClient());
-    return tableServiceClient.compact(compactionInstantTime, shouldComplete);
+    HoodieWriteMetadata<JavaRDD<WriteStatus>> compactionMetadata = 
tableServiceClient.compact(compactionInstantTime, shouldComplete);
+    autoCleanOnCommit();
+    return compactionMetadata;

Review Comment:
   From the context, we have no idea whether this code is triggered from 
offline job or online async task.



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