Permalink
Browse files

ACCUMULO-834 adjust threadpool size quickly: storm events (like root …

…tablet moves) cause lots of connections on large clusters

git-svn-id: https://svn.apache.org/repos/asf/accumulo/trunk@1410025 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent cca13b7 commit 8ef22fc11c8f82da696e2170dc155c39836f3bf2 Eric C. Newton committed Nov 15, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java
@@ -192,7 +192,7 @@ public static ServerPort startHsHaServer(int port, TProcessor processor, final S
@Override
public void run() {
if (pool.getCorePoolSize() <= pool.getActiveCount()) {
- int larger = pool.getCorePoolSize() + 2;
+ int larger = pool.getCorePoolSize() + Math.min(pool.getQueue().size(), 2);
log.info("Increasing server thread pool size on " + serverName + " to " + larger);
pool.setMaximumPoolSize(larger);
pool.setCorePoolSize(larger);

0 comments on commit 8ef22fc

Please sign in to comment.