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

Kanaka Kumar Avvaru commented on HDFS-6955:
-------------------------------------------

Thanks for the review [~vinayrpet].

Its a good suggestion to unify the release through 
{{replicaInfo.releaseAllBytesReserved()}} as this call is safe for multiple 
invocations also. Actually there is a leak exists if exception occurs just 
after {{createRBWFile}} (Difficult to write test case so tried through debug & 
caused exceptions through code inspection)

I have updated patch to remove the clearing logic in {{cleanupBlock()}} and use 
{{releaseAllBytesReserved()}} in {{BlockReceiver}} constructor on exception 
case which can handle both RBW & Tmp spaces clearing. 

I have done small changes in test code to ensure release additional space is 
not happening.

> DN should reserve disk space for a full block when creating tmp files
> ---------------------------------------------------------------------
>
>                 Key: HDFS-6955
>                 URL: https://issues.apache.org/jira/browse/HDFS-6955
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: datanode
>    Affects Versions: 2.5.0
>            Reporter: Arpit Agarwal
>            Assignee: Kanaka Kumar Avvaru
>         Attachments: HDFS-6955-01.patch, HDFS-6955-02.patch, 
> HDFS-6955-03.patch, HDFS-6955-04.patch, HDFS-6955-05.patch, HDFS-6955-06.patch
>
>
> HDFS-6898 is introducing disk space reservation for RBW files to avoid 
> running out of disk space midway through block creation.
> This Jira is to introduce similar reservation for tmp files.



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

Reply via email to