beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (BEAM-1657) DirectRunner should not call close twice in UnboundedSourceExecutorFactory
Date Tue, 14 Mar 2017 16:32:42 GMT


ASF GitHub Bot commented on BEAM-1657:

GitHub user tgroh opened a pull request:

    [BEAM-1657] Prevent Double-Close in UnboundedReadEvaluatorFactory

    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](
    Move the actual "close-and-resume" to the overall try block, to ensure
    that the reader cannot be double-closed if the first call to close()
    throws an IOException.

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

    $ git pull never_double_close

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

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

    This closes #2242


> DirectRunner should not call close twice in UnboundedSourceExecutorFactory
> --------------------------------------------------------------------------
>                 Key: BEAM-1657
>                 URL:
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-direct
>            Reporter: Ben Chambers
>            Assignee: Thomas Groh
> At the end of the processElement, in `finishRead` there is a 5% chance we decide to `close`
the reader. If the call to {{close}} throws an {{IOException}}, it will propagate that exception
back to the call to {{processElement}}, which will attempt to {{close}} the reader again,
which violates the {{AutoCloseable}} spec.

This message was sent by Atlassian JIRA

View raw message