You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/02/26 10:34:00 UTC

[jira] [Commented] (FLINK-8777) improve resource release when recovery from failover

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

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

GitHub user sihuazhou opened a pull request:

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

    Improve resource release for local recovery

    ## What is the purpose of the change
    
    This PR fixes [FLINK-8777](https://issues.apache.org/jira/browse/FLINK-8777). When recovery from failed, `TaskLocalStateStoreImpl.retrieveLocalState()` will be invoked, we can release all entry from `storedTaskStateByCheckpointID`  that does not satisfy `entry.checkpointID == checkpointID`, this can prevent the resource leak when job loop in `local checkpoint completed => failed => local checkpoint completed => failed ...`.
    
    ## Brief change log
    
      - release resource in retrieveLocalState
      - change the type of toDiscard from Map to a single entry.
    
    ## Verifying this change
    
    This changes can be verified by the exists tests.
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): (no)
      - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
      - The serializers: (no)
      - The runtime per-record code paths (performance sensitive): (no)
      - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (no)


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

    $ git pull https://github.com/sihuazhou/flink improve_resource_release_for_local_recovery

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

    https://github.com/apache/flink/pull/5578.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 #5578
    
----
commit 223aa37e625e81e73ccb5543fedd99ea72723ead
Author: sihuazhou <su...@...>
Date:   2018-02-26T02:46:51Z

    release local-checkpoint-data in retrieveLocalState.

commit 5373b394aaac8ae5010a251ae80d3a3b6ee61dc3
Author: sihuazhou <su...@...>
Date:   2018-02-26T02:54:53Z

    change the type of toDiscard from Map to a single entry.

----


> improve resource release when recovery from failover
> ----------------------------------------------------
>
>                 Key: FLINK-8777
>                 URL: https://issues.apache.org/jira/browse/FLINK-8777
>             Project: Flink
>          Issue Type: Improvement
>          Components: State Backends, Checkpointing
>    Affects Versions: 1.5.0
>            Reporter: Sihua Zhou
>            Assignee: Sihua Zhou
>            Priority: Major
>             Fix For: 1.5.0
>
>
> When recovery from failed, {{TaskLocalStateStoreImpl.retrieveLocalState()}} will be invoked, we can release all entry from {{storedTaskStateByCheckpointID}}  that does not satisfy {{entry.checkpointID == checkpointID}}, this can prevent the resource leak when job loop in {{local checkpoint completed => failed => local checkpoint completed => failed ...}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)