hudi-agent commented on code in PR #20323:
URL: https://github.com/apache/hudi/pull/20323#discussion_r4273010932
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteOperatorCoordinator.java:
##########
@@ -587,11 +592,17 @@ private void handleBootstrapEvent(WriteMetadataEvent
event) {
this.eventBuffers.cleanLegacyEvents(event);
return;
}
- EventBuffer eventBuffer =
this.eventBuffers.getOrCreateBootstrapBuffer(event);
- eventBuffer.addBootstrapEvent(event);
- if (eventBuffer.allBootstrapEventsReceived()) {
+ // The writer may have observed a pending instant before its normal commit
finished.
+ // Do not recreate the committed buffer when that bootstrap event arrives
later.
+ if (this.eventBuffers.getEventBuffer(event.getCheckpointId()) == null
Review Comment:
🤖 nit: would it make sense to move this two-part condition into a helper
like `isAlreadyCommitted(event)`, so the guard says what it checks without
leaning on the comment?
<sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag
quality.</i></sub>
--
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]