You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "danny0405 (via GitHub)" <gi...@apache.org> on 2023/04/26 02:09:45 UTC
[GitHub] [hudi] danny0405 commented on a diff in pull request #8568: [HUDI-6134] prevent two clean run concurrently in flink.
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-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org