hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-6898) DN must reserve space for a full block when an RBW block is created
Date Fri, 05 Sep 2014 22:04:29 GMT

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

Chris Nauroth commented on HDFS-6898:

Hi, [~arpitagarwal].  The patch looks great.  I have just one comment.  In {{FsVolumeImpl#releaseReservedSpace}},
the failsafe logic could be subject to a data race.  If the {{addAndGet}} results in a negative
value, and then another thread calls {{reserveSpaceForRbw}} before the reset to 0 executes,
then we'd lose that second thread's reservation.  Another approach might be to use a loop
that calculates the new value (or 0) and makes a single call to {{compareAndSet}}, repeating
until successful.

> DN must reserve space for a full block when an RBW block is created
> -------------------------------------------------------------------
>                 Key: HDFS-6898
>                 URL: https://issues.apache.org/jira/browse/HDFS-6898
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: datanode
>    Affects Versions: 2.5.0
>            Reporter: Gopal V
>            Assignee: Arpit Agarwal
>         Attachments: HDFS-6898.01.patch, HDFS-6898.03.patch, HDFS-6898.04.patch, HDFS-6898.05.patch
> DN will successfully create two RBW blocks on the same volume even if the free space
is sufficient for just one full block.
> One or both block writers may subsequently get a DiskOutOfSpace exception. This can be
avoided by allocating space up front.

This message was sent by Atlassian JIRA

View raw message