[ https://issues.apache.org/jira/browse/HDFS-3646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13412901#comment-13412901 ]
Kihwal Lee commented on HDFS-3646: ---------------------------------- bq. .... the lost stream will remain open as long as the client is open. I think Daryn is bringing up the issue because its solution also take care of this jira. If we have a finializer for FileSystem, we could have it call close(), then everything will go away. But short of automatic cleaning, this issue still remains. Currently DFSClient won't get garbage collected even if lost streams are automatically closed. I think we should still fix it, even if we eventually implement automatic clean-up. > LeaseRenewer can hold reference to inactive DFSClient instances forever > ----------------------------------------------------------------------- > > Key: HDFS-3646 > URL: https://issues.apache.org/jira/browse/HDFS-3646 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs client > Affects Versions: 0.23.3, 2.0.0-alpha > Reporter: Kihwal Lee > Assignee: Kihwal Lee > Priority: Critical > Fix For: 0.23.3, 2.0.1-alpha, 3.0.0 > > > If {{LeaseRenewer#closeClient()}} is not called, {{LeaseRenewer}} keeps the > reference to a {{DFSClient}} instance in {{dfsclients}} forever. This > prevents {{DFSClient}}, {{LeaseRenewer}}, conf, etc. from being garbage > collected, leading to memory leak. > {{LeaseRenewer}} should remove the reference after some delay, if a > {{DFSClient}} instance no longer has active streams. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira