danny0405 commented on code in PR #10767:
URL: https://github.com/apache/hudi/pull/10767#discussion_r1508362850
##########
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:
We need to reload the active timeline to ensure it is the latest one.
--
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]