Ted Yu created FLINK-2912:
-----------------------------

             Summary: Potential resource leak due to unclosed RandomAccessFile 
in StaticFileServerHandler
                 Key: FLINK-2912
                 URL: https://issues.apache.org/jira/browse/FLINK-2912
             Project: Flink
          Issue Type: Bug
            Reporter: Ted Yu


Here is related code in respondAsLeader():
{code}
    final RandomAccessFile raf;
    try {
      raf = new RandomAccessFile(file, "r");
...
    long fileLength = raf.length();
...
    // write the content.
    ctx.write(new DefaultFileRegion(raf.getChannel(), 0, fileLength), 
ctx.newProgressivePromise());
{code}
There is no close() call to raf before returning.



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

Reply via email to