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

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

GitHub user StefanRRichter opened a pull request:

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

    [FLINK-5421] Explicit restore method in Snapshotable interface

    This PR introduces an explicit ``restore(...)`` method to match the 
``snapshot(...)`` method in this interface.
    
    Currently, restore happens implicitly in backends, i.e. when state handles 
are provided, backends execute restore logic in their constructors. This 
behaviour makes it hard for backends to participate in the task's lifecycle 
through ``CloseableRegistry``}, because we can only register backend objects 
after they have been constructed. As a result, for example, all restore 
operations that happen in the constructor are not responsive to cancelation.
    
    This PR introduces an explicit restore, we can first create a backend 
object, then register it, and only then run restore.

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

    $ git pull https://github.com/StefanRRichter/flink ExlicitRestoreForBackends

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

    https://github.com/apache/flink/pull/3074.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 #3074
    
----
commit 19d76b8ea3a33e99aa3c6609c1517b5d7b918f1d
Author: Stefan Richter <[email protected]>
Date:   2017-01-05T22:45:13Z

    Explicit restore for backends

----


> Explicit restore method in Snapshotable
> ---------------------------------------
>
>                 Key: FLINK-5421
>                 URL: https://issues.apache.org/jira/browse/FLINK-5421
>             Project: Flink
>          Issue Type: Improvement
>            Reporter: Stefan Richter
>            Assignee: Stefan Richter
>
> We should introduce an explicit {{restore(...)}} method to match the 
> {{snapshot(...)}} method in this interface.
> Currently, restore happens implicit in backends, i.e. when state handles are 
> provided, backends execute restore logic in their constructors. This 
> behaviour makes it hard for backends to participate in the task's lifecycle 
> through {{CloseableRegistry}}, because we can only register backend objects 
> after they have been constructed. As a result, for example, all restore 
> operations that happen in the constructor are not responsive to cancelation.
> When we introduce an explicit restore, we can first create a backend object, 
> then register it, and only then run restore.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to