rkhachatryan commented on a change in pull request #18297: URL: https://github.com/apache/flink/pull/18297#discussion_r785510841
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/changelog/ChangelogStateHandleStreamImpl.java ########## @@ -83,11 +80,7 @@ public KeyedStateHandle getIntersection(KeyGroupRange keyGroupRange) { @Override public void discardState() throws Exception { - // discard only on TM; on JM, shared state is removed on subsumption - if (stateRegistry == null) { - bestEffortDiscardAllStateObjects( - handlesAndOffsets.stream().map(t2 -> t2.f0).collect(Collectors.toList())); - } + // do nothing: rely on SharedStateRegistry for cleanup after ACK; Review comment: I meant acknowledging checkpoint by task to JobManager. I expaneded the comment: ``` // Do nothing: state will be discarded by SharedStateRegistry once JM receives it and a // newer checkpoint completes without using it. JM might not receive the handle in the // following cases: // 1. hard TM failure // 2. job termination // 3. materialization of changes written pre-emptively // The above cases will be addressed by FLINK-23139 and/or FLINK-24852 ``` WDYT? -- 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-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org