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

MemStoreScanner {kvsetAtCreation,snapshotAtCreation} should be private and not volatile

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.95.2
    • 0.95.0
    • None
    • None
    • Reviewed

    Description

      I was looking over this code and was confused why these variables were volatile, as they don't need to be [the constructor, which is the only place the variables are set, is already protected by a lock].

      I doubt this makes much performance difference (I haven't measured); this is more of a documentation difference to say nothing special is going on here .

      https://issues.apache.org/jira/browse/HBASE-4485?focusedCommentId=13132733&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13132733 also talks about this, but it doesn't seem to have been implemented.

      Attachments

        1. HBASE-6333.patch
          0.8 kB
          Gregory Chanan

        Activity

          People

            gchanan Gregory Chanan
            gchanan Gregory Chanan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: