hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From syuanji...@apache.org
Subject hbase git commit: HBASE-15691 ConcurrentModificationException in BucketAllocator
Date Wed, 21 Jun 2017 22:59:01 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.1 106471bfb -> 24d94e857


HBASE-15691 ConcurrentModificationException in BucketAllocator


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/24d94e85
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/24d94e85
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/24d94e85

Branch: refs/heads/branch-1.1
Commit: 24d94e857ef8897b90eed63397ea8ba9560963f3
Parents: 106471b
Author: Stephen Yuan Jiang <syuanjiangdev@gmail.com>
Authored: Wed Jun 21 15:23:59 2017 -0700
Committer: Stephen Yuan Jiang <syuanjiangdev@gmail.com>
Committed: Wed Jun 21 15:57:10 2017 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.java   | 6 +++---
 .../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java   | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/24d94e85/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.java
index aece6a6..8f50160 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketAllocator.java
@@ -184,7 +184,7 @@ public final class BucketAllocator {
       this.sizeIndex = sizeIndex;
     }
 
-    public void instantiateBucket(Bucket b) {
+    public synchronized void instantiateBucket(Bucket b) {
       assert b.isUninstantiated() || b.isCompletelyFree();
       b.reconfigure(sizeIndex, bucketSizes, bucketCapacity);
       bucketList.put(b, b);
@@ -236,7 +236,7 @@ public final class BucketAllocator {
       return b;
     }
 
-    private void removeBucket(Bucket b) {
+    private synchronized void removeBucket(Bucket b) {
       assert b.isCompletelyFree();
       bucketList.remove(b);
       freeBuckets.remove(b);
@@ -252,7 +252,7 @@ public final class BucketAllocator {
       if (b.isCompletelyFree()) completelyFreeBuckets.put(b, b);
     }
 
-    public IndexStatistics statistics() {
+    public synchronized IndexStatistics statistics() {
       long free = 0, used = 0;
       for (Object obj : bucketList.keySet()) {
         Bucket b = (Bucket) obj;

http://git-wip-us.apache.org/repos/asf/hbase/blob/24d94e85/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
index 3f415b8..666ba06 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
@@ -708,6 +708,8 @@ public class BucketCache implements BlockCache, HeapSize {
         }
       }
 
+    } catch (Throwable t) {
+      LOG.warn("Failed freeing space", t);
     } finally {
       cacheStats.evict();
       freeInProgress = false;


Mime
View raw message