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 2017/03/14 16:32:42 UTC
[jira] [Commented] (BEAM-1657) DirectRunner should not call close
twice in UnboundedSourceExecutorFactory
[ https://issues.apache.org/jira/browse/BEAM-1657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15924519#comment-15924519 ]
ASF GitHub Bot commented on BEAM-1657:
--------------------------------------
GitHub user tgroh opened a pull request:
https://github.com/apache/beam/pull/2242
[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](https://www.apache.org/licenses/icla.txt).
---
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 https://github.com/tgroh/beam never_double_close
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/beam/pull/2242.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 #2242
----
----
> DirectRunner should not call close twice in UnboundedSourceExecutorFactory
> --------------------------------------------------------------------------
>
> Key: BEAM-1657
> URL: https://issues.apache.org/jira/browse/BEAM-1657
> 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
(v6.3.15#6346)