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

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

GitHub user fholger opened a pull request:

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

    [FLINK-4709] Fix resource leak in InputStreamFSInputWrapper

    InputStreamFSInputWrapper is a wrapper around an arbitrary Java 
InputStream. As such, it needs to reimplement the close() function and forward 
it to the wrapped stream, otherwise there is a potential resource leak. This PR 
forwards the close() call to the underlying stream.

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

    $ git pull https://github.com/fholger/flink flink-4709

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

    https://github.com/apache/flink/pull/2581.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 #2581
    
----
commit 8ac14e34f87bcc318e9a57b8385fc419f3443345
Author: Holger Frydrych <holger.frydr...@tngtech.com>
Date:   2016-10-03T12:34:19Z

    [FLINK-4709] Fix resource leak in InputStreamFSInputWrapper

----


> InputStreamFSInputWrapper does not close wrapped stream
> -------------------------------------------------------
>
>                 Key: FLINK-4709
>                 URL: https://issues.apache.org/jira/browse/FLINK-4709
>             Project: Flink
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.3, 1.1.2
>            Reporter: Holger Frydrych
>
> In FileInputFormat::decorateInputStream (flink.api.common.io), if the 
> inputStream gets wrapped by an InputStreamFSInputWrapper, it will never get 
> closed. FileInputFormat does call close() on its stream, but the wrapper does 
> not implement close() to forward this call to the wrapped stream. This leads 
> to a resource leak which can eventually exhaust the maximum number of open 
> file handles allowed if processing a lot of input files.



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

Reply via email to