Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-10693

Correct declarations of Atomic* fields from 'volatile' to 'final'

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.98.1, 0.99.0
    • Component/s: io, master
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      By checking the usage of these Atomic* fields, they themselves don't change once being assigned to referencing an Atomic* object, so 'final' rather than 'volatile' is more proper.
      On the other hand, the 'value' encapsulated in Atomic* is already declared 'volatile', which guarantees to perform correctly in multi-threads scenarios.

        Attachments

        1. HBASE-10693-trunk_v1.patch
          1 kB
          Honghua Feng

          Activity

            People

            • Assignee:
              fenghh Honghua Feng
              Reporter:
              fenghh Honghua Feng
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: