[ 
https://issues.apache.org/jira/browse/FLINK-4714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15897151#comment-15897151
 ] 

ASF GitHub Bot commented on FLINK-4714:
---------------------------------------

Github user StephanEwen commented on the issue:

    https://github.com/apache/flink/pull/3474
  
    I would suggest to do the change differently. Right now, all the task logic 
is pretty complex as it is, and this makes it even more complex.
    
    My suggestion would be to
      1. Change the `AbstractInvokable` to not have a zero-argument 
constructor, but only one which takes an `Environment`
      2. Change the creation of the invokables to call that constructor, update 
all the tests
      3. Change the `StreamTask` to do its initialization of everything in the 
constructor. That way, we also avoid all the `NullPointerException`
    
    That way, transitioning to `RUNNING` just before calling `invoke()` will 
fix the issue.
    
    If you want to follow up on this, I would suggest to make individual pull 
requests for (1,2) and (3)


> Set task state to RUNNING after state has been restored
> -------------------------------------------------------
>
>                 Key: FLINK-4714
>                 URL: https://issues.apache.org/jira/browse/FLINK-4714
>             Project: Flink
>          Issue Type: Improvement
>          Components: Distributed Coordination, State Backends, Checkpointing
>    Affects Versions: 1.2.0
>            Reporter: Till Rohrmann
>            Assignee: Wei-Che Wei
>
> The task state is set to {{RUNNING}} as soon as the {{Task}} is executed. 
> That, however, happens before the state of the {{StreamTask}} invokable has 
> been restored. As a result, the {{CheckpointCoordinator}} starts to trigger 
> checkpoints even though the {{StreamTask}} is not ready.
> In order to avoid aborting checkpoints and properly start it, we should 
> switch the task state to {{RUNNING}} after the state has been restored.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to