[
https://issues.apache.org/jira/browse/HDFS-10549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Xiao Chen updated HDFS-10549:
-----------------------------
Resolution: Fixed
Hadoop Flags: Reviewed
Fix Version/s: 3.0.0-alpha2
2.8.0
Status: Resolved (was: Patch Available)
Thanks [~linyiqun] for fixing the issue, [~sebyonthenet] for reporting the
original HADOOP-13264, and [~arpitagarwal] and [~kihwal] for the help!
I have committed this to trunk, branch-2 and branch-2.8. (Trivial conflict
since DFSStripedOutputStream is 3.0 only, compiled and ran
{{TestDistributedFileSystem}} before pushing)
> Correctly revoke file leases when closing files
> -----------------------------------------------
>
> 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
> Fix For: 2.8.0, 3.0.0-alpha2
>
> 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: [email protected]
For additional commands, e-mail: [email protected]