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

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

GitHub user tony810430 opened a pull request:

    https://github.com/apache/flink/pull/3474

    [FLINK-4714] [runtime] [streaming] Set task state to RUNNING after state 
has been restored

    The changes in this PR are
    
    - add `open()` method in `AbstractInvokable` to let the invokable can be 
initialized during `DEPLOYING` state in `Task`. The default behavior is do 
nothing.
    - separate `invokable.invoke()` into `invokable.open()` and 
`invokable.invoke()` in `Task`, and transit task state from `DEPLOYING` to 
`RUNNING` between them.
    - `TaskCanceler` should be used to cancel the invokable in `DEPLOYING` 
state because invokable might be called in that state now.
    - update `StreamTask` and `StreamTaskTestHarness` to solve this issue in 
FLINK-4714

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tony810430/flink FLINK-4714

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/3474.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3474
    
----
commit baa0285ce481db0f96d59ed71d86f81b1f5fcd65
Author: Tony Wei <tony19920...@gmail.com>
Date:   2017-03-03T08:46:22Z

    [FLINK-4714] Set task state to RUNNING after state has been restored

----


> 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