Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-4014 Fix warnings found by findbugs2
  3. HDFS-4030

BlockManager excessBlocksCount and postponedMisreplicatedBlocksCount should be AtomicLongs

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: 2.0.3-alpha
    • Component/s: namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      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.

        Attachments

        1. hdfs-4030.txt
          4 kB
          Eli Collins
        2. hdfs-4030.txt
          4 kB
          Eli Collins

          Activity

            People

            • Assignee:
              eli Eli Collins
              Reporter:
              eli Eli Collins

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment