keith-turner commented on a change in pull request #2278:
URL: https://github.com/apache/accumulo/pull/2278#discussion_r713171133
##########
File path:
server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
##########
@@ -323,16 +323,11 @@ public static ThreadPoolExecutor
createSelfResizingThreadPool(final String serve
// however, this isn't really an issue, since it adjusts periodically
anyway
if (pool.getCorePoolSize() <= pool.getActiveCount()) {
int larger = pool.getCorePoolSize() + Math.min(pool.getQueue().size(),
2);
- log.info("Increasing server thread pool size on {} to {}", serverName,
larger);
- pool.setMaximumPoolSize(larger);
- pool.setCorePoolSize(larger);
+ ThreadPools.resizePool(pool, () -> larger, serverName + "-ClientPool");
} else {
if (pool.getCorePoolSize() > pool.getActiveCount() + 3) {
int smaller = Math.max(executorThreads, pool.getCorePoolSize() - 1);
- if (smaller != pool.getCorePoolSize()) {
- log.info("Decreasing server thread pool size on {} to {}",
serverName, smaller);
- pool.setCorePoolSize(smaller);
- }
+ ThreadPools.resizePool(pool, () -> smaller, serverName +
"-ClientPool");
Review comment:
hmm so maybe this code (before this change) never achieved its intent..
I wonder if it only increased but never decreased
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]