wenbingshen commented on code in PR #10767:
URL: https://github.com/apache/hudi/pull/10767#discussion_r1508540371


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteOperatorCoordinator.java:
##########
@@ -434,9 +434,19 @@ private void handleBootstrapEvent(WriteMetadataEvent 
event) {
     if (Arrays.stream(eventBuffer).allMatch(evt -> evt != null && 
evt.isBootstrap())) {
       // start to initialize the instant.
       final String instant = Arrays.stream(eventBuffer)
-          .filter(evt -> evt.getWriteStatuses().size() > 0)
-          .findFirst().map(WriteMetadataEvent::getInstantTime)
-          .orElse(WriteMetadataEvent.BOOTSTRAP_INSTANT);
+              .filter(evt -> evt.getWriteStatuses().size() > 0)
+              .findFirst().map(WriteMetadataEvent::getInstantTime)
+              .orElse(WriteMetadataEvent.BOOTSTRAP_INSTANT);
+
+      // if currentInstant is pending && bootstrap event instant is empty
+      // reuse currentInstant, reject bootstrap
+      if 
(this.metaClient.getActiveTimeline().filterInflightsAndRequested().containsInstant(this.instant)
 && instant

Review Comment:
   Addressed. According to the repairs and test cases submitted by previous 
people, in this case, we only need to reuse the pending instant in `INSERT` 
mode.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to