pnowojski commented on code in PR #20233:
URL: https://github.com/apache/flink/pull/20233#discussion_r920072629
##########
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/SubtaskCheckpointCoordinatorTest.java:
##########
@@ -568,6 +572,53 @@ public void snapshotState(
}
}
+ @Test
+ public void
testChannelStateWriteResultLeakAndNotFailAfterCheckpointAborted() throws
Exception {
+ MockEnvironment mockEnvironment = MockEnvironment.builder().build();
Review Comment:
wrap with `try-with-resource`?
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SubtaskCheckpointCoordinatorImpl.java:
##########
@@ -316,6 +316,10 @@ public void checkpointState(
// broadcast cancel checkpoint marker to avoid downstream
back-pressure due to
// checkpoint barrier align.
operatorChain.broadcastEvent(new
CancelCheckpointMarker(metadata.getCheckpointId()));
+ channelStateWriter.abort(
+ metadata.getCheckpointId(),
+ new CancellationException("checkpoint aborted via
notification"),
+ true);
Review Comment:
I think you can not relay on this code to be executed.
`checkAndClearAbortedStatus` is using best effort `abortedCheckpointIds` set,
which can be for example pruned if it grows too large. So if FLINK-26803
doesn't work without this fix, we have to deal with it differently.
--
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]