[
https://issues.apache.org/jira/browse/HDFS-2132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060877#comment-13060877
]
Aaron T. Myers commented on HDFS-2132:
--------------------------------------
bq. Thanks Aaron for the explanation!
No problem.
bq. I might be missing a trick (again ) , but are you sure the Closeables will
be null after .close()?
Well, now that I look at it, you've effectively caught a bug. :)
The previous code was expressly setting {{bufReady}} and {{bufCurrent}} to
{{null}}, but not {{fp}} or {{fc}}. My patch didn't touch that code, but it
might as well fix it. I'll upload another patch in a moment.
> Potential resource leak in EditLogFileOutputStream.close
> --------------------------------------------------------
>
> Key: HDFS-2132
> URL: https://issues.apache.org/jira/browse/HDFS-2132
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 0.23.0
> Reporter: Aaron T. Myers
> Assignee: Aaron T. Myers
> Fix For: 0.23.0
>
> Attachments: hdfs-2132.0.patch, hdfs-2132.1.patch, hdfs-2132.2.patch
>
>
> {{EditLogFileOutputStream.close(...)}} sequentially closes a series of
> underlying resources. If any of the calls to {{close()}} throw before the
> last one, the later resources will never be closed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira