zhuzhurk commented on code in PR #20082: URL: https://github.com/apache/flink/pull/20082#discussion_r910576592
########## flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionVertex.java: ########## @@ -336,57 +357,56 @@ public void resetForNewExecution() { } private void resetForNewExecutionInternal(final long timestamp) { - final Execution oldExecution = currentExecution; - final ExecutionState oldState = oldExecution.getState(); - - if (oldState.isTerminal()) { - if (oldState == FINISHED) { - // pipelined partitions are released in Execution#cancel(), covering both job - // failures and vertex resets - // do not release pipelined partitions here to save RPC calls - oldExecution.handlePartitionCleanup(false, true); - getExecutionGraphAccessor() - .getPartitionGroupReleaseStrategy() - .vertexUnfinished(executionVertexId); - } + final boolean isFinished = (getExecutionState() == FINISHED); - executionHistory.add(oldExecution.archive()); + resetExecutionsInternal(); Review Comment: It's no longer needed. Racing would not happen anymore since JM was reworked to use a single thread model versions ago. -- 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