You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/10/24 21:34:58 UTC

[jira] [Commented] (BEAM-811) DoFnLifecycleManager may call teardown on a DoFn multiple times

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

ASF GitHub Bot commented on BEAM-811:
-------------------------------------

GitHub user tgroh opened a pull request:

    https://github.com/apache/incubator-beam/pull/1174

    [BEAM-811] Improve teardown behavior in DoFnLifecycleManager

    Be sure to do all of the following to help us incorporate your contribution
    quickly and easily:
    
     - [ ] Make sure the PR title is formatted like:
       `[BEAM-<Jira issue #>] Description of pull request`
     - [ ] Make sure tests pass via `mvn clean verify`. (Even better, enable
           Travis-CI on your fork and ensure the whole test matrix passes).
     - [ ] Replace `<Jira issue #>` in the title with the actual Jira issue
           number, if there is one.
     - [ ] If this contribution is large, please file an Apache
           [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.txt).
    
    ---
    
    Use Cache invalidation hooks to teardown DoFns that are no longer in the
    cache. Ensure that remove() and removeAll() report thrown exceptions
    even though the exceptions are not thrown by the LoadingCache.

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

    $ git pull https://github.com/tgroh/incubator-beam multi-teardown

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

    https://github.com/apache/incubator-beam/pull/1174.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 #1174
    
----
commit 7558e1461c44cf63fa5c89976a41c2feab0a92a3
Author: Thomas Groh <tg...@google.com>
Date:   2016-10-24T20:43:43Z

    Improve teardown behavior in DoFnLifecycleManager
    
    Use Cache invalidation hooks to teardown DoFns that are no longer in the
    cache. Ensure that remove() and removeAll() report thrown exceptions
    even though the exceptions are not thrown by the LoadingCache.

----


> DoFnLifecycleManager may call teardown on a DoFn multiple times
> ---------------------------------------------------------------
>
>                 Key: BEAM-811
>                 URL: https://issues.apache.org/jira/browse/BEAM-811
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-direct
>            Reporter: Thomas Groh
>            Assignee: Thomas Groh
>             Fix For: 0.4.0-incubating
>
>
> Because the iterator returned by ConcurrentMap.iterator() is weakly consistent, we may obtain a DoFn that is simultaneously removed from the map while iterating in DoFnLifecycleManager#removeAll and removed via the explicit remove call in DoFnLifecycleManger#remove
> Instead, utilize the Cache#invalidate() method and an appropriate RemovalListener to ensure that DoFn instances that are removed are torn down, and exceptions are appropriately reported.



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