You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/07/13 13:32:27 UTC
[GitHub] [flink] pnowojski commented on a diff in pull request #20233: [FLINK-28474][checkpoint] Fix the bug ChannelStateWriteResult might not fail after checkpoint abort
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org