This is an automated email from the ASF dual-hosted git repository.

danny0405 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new c63728019a [HUDI-5412] Send the boostrap event if the JM also rebooted 
(#7497)
c63728019a is described below

commit c63728019a091b60591241e41062465098ce049c
Author: Danny Chan <[email protected]>
AuthorDate: Sun Dec 18 17:40:32 2022 +0800

    [HUDI-5412] Send the boostrap event if the JM also rebooted (#7497)
---
 .../java/org/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 f8438a4eb2..fa4c3db86e 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 @@ public abstract class AbstractStreamWriteFunction<I>
       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);

Reply via email to