[ 
https://issues.apache.org/jira/browse/FLINK-4573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stephan Ewen resolved FLINK-4573.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 1.2.0

Fixed via 2afc092461cf68cf0f3c26a3ab4c58a7bd68cf71

Thank you for the contribution!

> Potential resource leak due to unclosed RandomAccessFile in 
> TaskManagerLogHandler
> ---------------------------------------------------------------------------------
>
>                 Key: FLINK-4573
>                 URL: https://issues.apache.org/jira/browse/FLINK-4573
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>             Fix For: 1.2.0
>
>
> {code}
>                                                 try {
>                                                         raf = new 
> RandomAccessFile(file, "r");
>                                                 } catch 
> (FileNotFoundException e) {
>                                                         display(ctx, request, 
> "Displaying TaskManager log failed.");
>                                                         LOG.error("Displaying 
> TaskManager log failed.", e);
>                                                         return;
>                                                 }
>                                                 long fileLength = 
> raf.length();
>                                                 final FileChannel fc = 
> raf.getChannel();
> {code}
> If length() throws IOException, raf would be left unclosed.



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

Reply via email to