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

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

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment