flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-2866) Potential resource leak due to unclosed ObjectInputStream in FileSerializableStateHandle
Date Sat, 24 Oct 2015 14:08:27 GMT

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

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

Github user StephanEwen commented on the pull request:

    https://github.com/apache/flink/pull/1289#issuecomment-150815829
  
    Yeah, it is hard to make these tests deterministic, as they depend on processing time
trigger. Thought I found a trick, but it is apparently not a rock solid test. I'll try and
rework the test for more stability...


> Potential resource leak due to unclosed ObjectInputStream in FileSerializableStateHandle
> ----------------------------------------------------------------------------------------
>
>                 Key: FLINK-2866
>                 URL: https://issues.apache.org/jira/browse/FLINK-2866
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Ted Yu
>
> Here is related code:
> {code}
>   public T getState(ClassLoader classLoader) throws Exception {
>     FSDataInputStream inStream = getFileSystem().open(getFilePath());
>     ObjectInputStream ois = new InstantiationUtil.ClassLoaderObjectInputStream(inStream,
classLoader);
>     return (T) ois.readObject();
> {code}
> ObjectInputStream should be closed upon exit from the method



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

Mime
View raw message