hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eli Collins (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-4030) BlockManager excessBlocksCount and postponedMisreplicatedBlocksCount should be AtomicLongs
Date Wed, 10 Oct 2012 23:07:02 GMT

     [ https://issues.apache.org/jira/browse/HDFS-4030?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Eli Collins updated HDFS-4030:
------------------------------

    Attachment: hdfs-4030.txt

Patch attached. Verified this fixes the findbugs warnings on version 2.5.2.
                
> BlockManager excessBlocksCount and postponedMisreplicatedBlocksCount should be AtomicLongs
> ------------------------------------------------------------------------------------------
>
>                 Key: HDFS-4030
>                 URL: https://issues.apache.org/jira/browse/HDFS-4030
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node
>    Affects Versions: 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>         Attachments: hdfs-4030.txt
>
>
> The BlockManager excessBlocksCount and postponedMisreplicatedBlocksCount fields are currently
volatile longs which are incremented, which isn't thread safe. It looks like they're always
incremented on paths that hold the NN write lock but it would be easier and less error prone
for future changes if we made them AtomicLongs. The other volatile long members are just set
in one thread and read in another so they're fine as is.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message