Github user KurtYoung commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2594#discussion_r82496888
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java 
---
    @@ -507,12 +509,18 @@ public void suspendJob(final Throwable cause) {
         * @return Acknowledge the task execution state update
         */
        @RpcMethod
    -   public boolean updateTaskExecutionState(final TaskExecutionState 
taskExecutionState) {
    +   public Acknowledge updateTaskExecutionState(final TaskExecutionState 
taskExecutionState) throws ExecutionGraphException {
                if (taskExecutionState == null) {
    -                   return false;
    +                   throw new NullPointerException("TaskExecutionState must 
not be null.");
    +           }
    +
    +           if (executionGraph.updateState(taskExecutionState)) {
    +                   return Acknowledge.get();
                } else {
    -                   return executionGraph.updateState(taskExecutionState);
    +                   throw new ExecutionGraphException("The execution 
attempt " +
    --- End diff --
    
    Execution attempt not exists is one of the failure causes, maybe we can 
move the throw behavior into the function call updateState, and let the 
function decide which exception should be thrown


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to