metaswirl commented on a change in pull request #18689: URL: https://github.com/apache/flink/pull/18689#discussion_r803748913
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/Executing.java ########## @@ -80,49 +89,53 @@ public void cancel() { getExecutionGraph(), getExecutionGraphHandler(), getOperatorCoordinatorHandler()); } + private void handleFailure(Failure failure) { + failureCollection.add(failure); + FailureResult failureResult = context.howToHandleFailure(failure); + transitionOnFailure(failureResult); + } + @Override public void handleGlobalFailure(Throwable cause) { - handleAnyFailure(cause); + handleFailure(Failure.createGlobal(cause)); } - private void handleAnyFailure(Throwable cause) { - final FailureResult failureResult = context.howToHandleFailure(cause); + @Override + boolean updateTaskExecutionState(TaskExecutionStateTransition taskExecutionStateTransition) { + final boolean successfulUpdate = + getExecutionGraph().updateState(taskExecutionStateTransition); + + if (successfulUpdate + && taskExecutionStateTransition.getExecutionState() == ExecutionState.FAILED) { + handleFailure( + Failure.createLocal( + extractError(taskExecutionStateTransition), + extractExecutionVertexID(taskExecutionStateTransition))); + } + + return successfulUpdate; Review comment: Sounds good, will check. -- 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