Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-4106

BPServiceActor#lastHeartbeat, lastBlockReport and lastDeletedReport should be declared as volatile

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0.0-alpha1
    • 2.0.3-alpha
    • namenode, test
    • None
    • Reviewed

    Description

      All these variables may be assigned/read by a testing thread (through BPServiceActor#triggerXXX) while also assigned/read by the actor thread. Thus they should be declared as volatile to make sure the "happens-before" consistency.

      Attachments

        1. HDFS-4106-trunk.002.patch
          1 kB
          Jing Zhao
        2. HDFS-4106-trunk.001.patch
          0.9 kB
          Jing Zhao

        Activity

          People

            jingzhao Jing Zhao
            jingzhao Jing Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: