hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yiqun Lin (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HDFS-10549) Memory leak if exception happens when closing files being written
Date Tue, 16 Aug 2016 00:36:20 GMT

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

Yiqun Lin edited comment on HDFS-10549 at 8/16/16 12:35 AM:
------------------------------------------------------------

Sorry, Xiao, I'm misread for that.
{quote}
I think we can remove the throw IOException from the method signature and simplify the logic
here, right?
{quote}
Yes, that's right. Attach a new patch to make a quick change for this.

One point that I want to say: In my latest patch, I keep to use the object {{MultipleIOException}}.
If there is only on IOExeption, it will just throw that one. And we can still use {{MultipleIOException}}
to add IOException in the future.

Hope my latest patch will satisfied with you.


was (Author: linyiqun):
Sorry, Xiao, I'm misread for that.
{quote}
I think we can remove the throw IOException from the method signature and simplify the logic
here, right?
{quote}
Yes, that's right. Attach a new patch to make a quick change for this.

> Memory leak if exception happens when closing files being written
> -----------------------------------------------------------------
>
>                 Key: HDFS-10549
>                 URL: https://issues.apache.org/jira/browse/HDFS-10549
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client
>    Affects Versions: 2.7.1
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>         Attachments: HDFS-10549.001.patch, HDFS-10549.002.patch, HDFS-10549.003.patch,
HDFS-10549.004.patch, HDFS-10549.005.patch
>
>
> As HADOOP-13264 memtioned, the code dfsClient.endFileLease(fileId) in {{DFSOutputStream}}
will not be executed when the IOException happened in {{closeImpl()}}.
> {code}
>   public void close() throws IOException {
>     synchronized (this) {
>       try (TraceScope ignored =
>           dfsClient.newPathTraceScope("DFSOutputStream#close", src)) {
>         closeImpl();
>       }
>     }
>     dfsClient.endFileLease(fileId);
>     }
>   }
> {code}
> This will cause that the files not be closed in {{DFSClient}} and finally lead to the
memory leak. In {{DFSStripedOutputStream}}, it existed the same problem.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message