danny0405 commented on code in PR #5950:
URL: https://github.com/apache/hudi/pull/5950#discussion_r906739963


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteOperatorCoordinator.java:
##########
@@ -305,6 +306,13 @@ public void subtaskFailed(int i, @Nullable Throwable 
throwable) {
     // reset the event
     this.eventBuffer[i] = null;
     LOG.warn("Reset the event for task [" + i + "]", throwable);
+    if (Arrays.stream(this.eventBuffer).allMatch(event -> event == null)) {

Review Comment:
   In `StreamWriteOperatorCoordinator#notifyCheckpointAborted`,
   we can add another check condition:
   `checkpointId == this.checkpointId && 
!WriteMetadataEvent.BOOTSTRAP_INSTANT.equals(this.instant)`
   to make sure not abort the instant during first time startup for rollback



##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteOperatorCoordinator.java:
##########
@@ -305,6 +306,13 @@ public void subtaskFailed(int i, @Nullable Throwable 
throwable) {
     // reset the event
     this.eventBuffer[i] = null;
     LOG.warn("Reset the event for task [" + i + "]", throwable);
+    if (Arrays.stream(this.eventBuffer).allMatch(event -> event == null)) {

Review Comment:
   Can we roll back this change now, not sure if it is right.



-- 
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