From f6bba36d1adc3a52889839246129a89b754f8a43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=8E=89=E5=85=86?= Date: Sun, 18 Dec 2022 12:25:26 +0800 Subject: [PATCH] [HUDI-5412] Send the boostrap event if the JM also rebooted --- .../apache/hudi/sink/common/AbstractStreamWriteFunction.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/common/AbstractStreamWriteFunction.java b/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/common/AbstractStreamWriteFunction.java index f8438a4eb245c..fa4c3db86eac1 100644 --- a/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/common/AbstractStreamWriteFunction.java +++ b/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/common/AbstractStreamWriteFunction.java @@ -217,8 +217,9 @@ private void sendBootstrapEvent() { if (this.currentInstant != null) { LOG.info("Recover task[{}] for instant [{}] with attemptId [{}]", taskID, this.currentInstant, attemptId); this.currentInstant = null; + return; } - return; + // the JM may have also been rebooted, sends the bootstrap event either } this.eventGateway.sendEventToCoordinator(WriteMetadataEvent.emptyBootstrap(taskID)); LOG.info("Send bootstrap write metadata event to coordinator, task[{}].", taskID);