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 2017/04/05 21:39:41 UTC

[jira] [Commented] (FLINK-5629) Unclosed RandomAccessFile in StaticFileServerHandler#respondAsLeader()

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

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

GitHub user zentol opened a pull request:

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

    [FLINK-5629] [runtime-web] Close RAF in FileServerHandlers when exception occurs

    This PR makes sure that the RandomAccessFile opened by FileServerhandlers are closed if an exception occurs after opening it. If no exception occurs `respondWithFile` we still rely on netty to properly close the file.

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

    $ git pull https://github.com/zentol/flink 5629_raf_close

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

    https://github.com/apache/flink/pull/3678.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 #3678
    
----

----


> Unclosed RandomAccessFile in StaticFileServerHandler#respondAsLeader()
> ----------------------------------------------------------------------
>
>                 Key: FLINK-5629
>                 URL: https://issues.apache.org/jira/browse/FLINK-5629
>             Project: Flink
>          Issue Type: Bug
>          Components: Webfrontend
>            Reporter: Ted Yu
>            Priority: Minor
>
> {code}
>     final RandomAccessFile raf;
>     try {
>       raf = new RandomAccessFile(file, "r");
> ...
>     long fileLength = raf.length();
> {code}
> The RandomAccessFile should be closed upon return from method.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)