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

Data race on Compactor.writer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.5.0, 3.0.0-alpha-3
    • Compaction
    • None
    • Reviewed

    Description

      In Compactor.getCompactionTargets, we use synchronized on the writer instance but it does not help resolve the data race problem, because in other places we do not use synchronized...

      And since it is not a big deal to the upper layer an old snapshot, we could just make the writer instance volatile and use it directly in the method, just make sure we always use the same instance in the method, i.e, assign it to a local var first.

      Attachments

        Issue Links

          Activity

            People

              zhangduo Duo Zhang
              zhangduo Duo Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: