Skip to content

Commit 79d972f

Browse files
authored
Fix Fate pool watcher bug (apache#5171)
Was incorrectly calculating the number of TransactionRunners to execute
1 parent 7b8b213 commit 79d972f

File tree

1 file changed

+1
-1
lines changed
  • core/src/main/java/org/apache/accumulo/core/fate

1 file changed

+1
-1
lines changed

core/src/main/java/org/apache/accumulo/core/fate/Fate.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ public void startTransactionRunners(AccumuloConfiguration conf) {
250250
// resize the pool if the property changed
251251
ThreadPools.resizePool(pool, conf, Property.MANAGER_FATE_THREADPOOL_SIZE);
252252
// If the pool grew, then ensure that there is a TransactionRunner for each thread
253-
int needed = conf.getCount(Property.MANAGER_FATE_THREADPOOL_SIZE) - pool.getQueue().size();
253+
int needed = conf.getCount(Property.MANAGER_FATE_THREADPOOL_SIZE) - pool.getActiveCount();
254254
if (needed > 0) {
255255
for (int i = 0; i < needed; i++) {
256256
try {

0 commit comments

Comments
 (0)