pgaref commented on code in PR #21923: URL: https://github.com/apache/flink/pull/21923#discussion_r1124078380
########## flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java: ########## @@ -733,8 +764,7 @@ void restoreInternal() throws Exception { // needed channelIOExecutor.shutdown(); - isRunning = true; - isRestoring = false; + taskState.status = TaskState.Status.RUNNING; Review Comment: Hey Roman, very good point since TaskCanceler is asynchronous in nature. However, the only way to invoke [Task cancelation](https://github.com/apache/flink/blob/8be94e6663d8ac6e3d74bf4cd5f540cc96c8289e/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java#L1662) is through the [invokable method](https://github.com/apache/flink/pull/21923/files#diff-0c5fe245445b932fa83fdaf5c4802dbe671b73e8d76f39058c6eaaaffd9639faL982-L983) that simultaneously marks the task as **not** Running and Canceled. In that sense, its not the same situation as failing, so I believe we are safe here. -- 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