You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "hbgstc123 (via GitHub)" <gi...@apache.org> on 2023/04/26 02:34:08 UTC
[GitHub] [hudi] hbgstc123 commented on a diff in pull request #8568: [HUDI-6134] prevent two clean run concurrently in flink.
hbgstc123 commented on code in PR #8568:
URL: https://github.com/apache/hudi/pull/8568#discussion_r1177274405
##########
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:
Right. Removed the catch clause and `ASYNC_ENABLED` condition, and add `!isCleaning` condition before `clean` function calls in subclass `ClusteringCommitSink` and `CompactionCommitSink`.
Pls take another look, thanks
--
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