You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2011/08/04 19:24:15 UTC

svn commit: r1153938 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/util/PoolMap.java

Author: tedyu
Date: Thu Aug  4 17:24:14 2011
New Revision: 1153938

URL: http://svn.apache.org/viewvc?rev=1153938&view=rev
Log:
HBASE-4150  Potentially too many connections may be opened if ThreadLocalPool
               or RoundRobinPool is used

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/PoolMap.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1153938&r1=1153937&r2=1153938&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Thu Aug  4 17:24:14 2011
@@ -185,6 +185,8 @@ Release 0.91.0 - Unreleased
    HBASE-4148  HFileOutputFormat doesn't fill in TIMERANGE_KEY metadata (Jonathan Hsieh)
    HBASE-4003  Cleanup Calls Conservatively On Timeout (Karthick)
    HBASE-3857  Fix TestHFileBlock.testBlockHeapSize test failure (Mikhail)
+   HBASE-4150  Potentially too many connections may be opened if ThreadLocalPool
+               or RoundRobinPool is used
 
   IMPROVEMENTS
    HBASE-3290  Max Compaction Size (Nicolas Spiegelberg via Stack)  

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/PoolMap.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/PoolMap.java?rev=1153938&r1=1153937&r2=1153938&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/PoolMap.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/PoolMap.java Thu Aug  4 17:24:14 2011
@@ -397,7 +397,8 @@ public class PoolMap<K, V> implements Ma
           poolSizes.put(this, poolSize = new AtomicInteger(0));
         }
         if (poolSize.intValue() >= maxSize) {
-          return null;
+          throw new IllegalStateException("poolSize ("+poolSize.intValue()+
+              ") has reached " + maxSize);
         }
         poolSize.incrementAndGet();
       }