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


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/CleanFunction.java:
##########
@@ -64,7 +64,19 @@ public void open(Configuration parameters) throws Exception {
     this.executor = 
NonThrownExecutor.builder(LOG).waitForTasksFinish(true).build();
     String instantTime = HoodieActiveTimeline.createNewInstantTime();
     LOG.info(String.format("exec clean with instant time %s...", instantTime));
-    executor.execute(() -> writeClient.clean(instantTime), "wait for cleaning 
finish");
+    executor.execute(() -> {
+      if (conf.getBoolean(FlinkOptions.CLEAN_ASYNC_ENABLED)) {
+        this.isCleaning = true;
+        try {
+          this.writeClient.clean(instantTime);
+        } catch (Throwable throwable) {

Review Comment:
   We need to execute the cleaning no matter whether async cleaning is true or 
false.



-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to