hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-4029) GenerationStamp should use an AtomicLong
Date Wed, 17 Oct 2012 05:50:03 GMT

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

Hudson commented on HDFS-4029:

Integrated in Hadoop-trunk-Commit #2880 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/2880/])
    HDFS-4029. GenerationStamp should use an AtomicLong. Contributed by Eli Collins (Revision

     Result = SUCCESS
eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1399096
Files : 
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/GenerationStamp.java

> GenerationStamp should use an AtomicLong 
> -----------------------------------------
>                 Key: HDFS-4029
>                 URL: https://issues.apache.org/jira/browse/HDFS-4029
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: name-node
>    Affects Versions: 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>             Fix For: 2.0.3-alpha
>         Attachments: hdfs-4029.txt
> GenerationStamp#genstamp is a volatile long. Incrementing volatiles is not thread safe,
which is currently not an issue because the only increment is done in nextStamp which is synchronized
(theoretically setStamp could race with nextStamp though that wouldn't happen given the current
code). It would be cleaner to use an AtomicLong so that genstamp itself is atomic and we don't
have to synchronize the various accesses to it.

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

View raw message