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

ConcurrentModificationException in BucketAllocator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.89-fb
    • 0.89-fb, 0.99.0, 0.98.6
    • regionserver
    • None
    • Reviewed

    Description

      The BucketCache WriterThread calls BucketCache.freeSpace() upon draining the RAM queue containing entries to be cached. freeSpace() in turn calls BucketSizeInfo.statistics() through BucketAllocator.getIndexStatistics(), which iterates over 'bucketList'. At the same time another WriterThread might call BucketAllocator.allocateBlock(), which may call BucketSizeInfo.allocateBlock(), add a bucket to 'bucketList' and consequently cause a ConcurrentModificationException. Calls to BucketAllocator.allocateBlock() are synchronized, but calls to BucketAllocator.getIndexStatistics() are not, which allows this race to occur.

      Attachments

        1. hbase-10205-trunk.patch
          2 kB
          Chunhui Shen

        Issue Links

          Activity

            People

              arjenroodselaar Arjen Roodselaar
              arjenroodselaar Arjen Roodselaar
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: