[ https://issues.apache.org/jira/browse/HBASE-10205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15252885#comment-15252885 ]
Andrew Purtell commented on HBASE-10205: ---------------------------------------- I will commit to branch-1 only for now after running the unit test suite, since it is already in master and 0.98, although it should go into branch-1.1 and branch-1.2 assuming the RMs for those branches are ok with the changes. The patch changes the type of the bucket lists and adds synchronization to some methods in BucketAllocator. Unfortunately it also has this code smell in BucketCache: {code} + } catch (Throwable t) { + LOG.warn("Failed freeing space", t); {code} /cc [~ndimiduk] [~busbey] > ConcurrentModificationException in BucketAllocator > -------------------------------------------------- > > Key: HBASE-10205 > URL: https://issues.apache.org/jira/browse/HBASE-10205 > Project: HBase > Issue Type: Bug > Components: regionserver > Affects Versions: 0.89-fb > Reporter: Arjen Roodselaar > Assignee: Arjen Roodselaar > Priority: Minor > Fix For: 0.89-fb, 0.99.0, 2.0.0, 0.98.6 > > Attachments: hbase-10205-trunk.patch > > > 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. -- This message was sent by Atlassian JIRA (v6.3.4#6332)