Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
2.0.4-alpha
-
None
-
None
Description
If the file closure fails due to some exception, then DFSOutputStream reference should be removed from the DFSClient#filesBeingWritten.
Which is useless to keep and also memory consuming.
If the same client is being used for long time,, then there is a chance of client getting OOM due to this.
fix would be simple.
Just cover complete DFSOutputStream#close() under try-finally and move dfsClient.endFileLease(src); to finally block.
Any thoughts..?
Attachments
Issue Links
- duplicates
-
HDFS-4504 DFSOutputStream#close doesn't always release resources (such as leases)
- Patch Available