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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.98.1, 0.99.0
    • io, master
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: