This is an automated email from the ASF dual-hosted git repository. krathbun pushed a commit to branch 3.1 in repository https://gitbox.apache.org/repos/asf/accumulo.git
commit d7cbdeceb739407cdab63a411877bfcea067769f Merge: 90b346add4 68cb5aaeba Author: Kevin Rathbun <kevinrr...@gmail.com> AuthorDate: Mon Oct 21 09:50:30 2024 -0400 Merge branch '2.1' into 3.1 core/src/main/java/org/apache/accumulo/core/fate/Fate.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --cc core/src/main/java/org/apache/accumulo/core/fate/Fate.java index 83793eced6,280922a332..d4d790a45d --- a/core/src/main/java/org/apache/accumulo/core/fate/Fate.java +++ b/core/src/main/java/org/apache/accumulo/core/fate/Fate.java @@@ -231,15 -230,23 +231,15 @@@ public class Fate<T> * * @param toLogStrFunc A function that converts Repo to Strings that are suitable for logging */ - public Fate(T environment, TStore<T> store, Function<Repo<T>,String> toLogStrFunc) { + public Fate(T environment, TStore<T> store, Function<Repo<T>,String> toLogStrFunc, + AccumuloConfiguration conf) { this.store = FateLogger.wrap(store, toLogStrFunc); this.environment = environment; - } - - /** - * Launches the specified number of worker threads. - */ - public void startTransactionRunners(AccumuloConfiguration conf) { final ThreadPoolExecutor pool = ThreadPools.getServerThreadPools().createExecutorService(conf, Property.MANAGER_FATE_THREADPOOL_SIZE, true); - fatePoolWatcher = + this.fatePoolWatcher = ThreadPools.getServerThreadPools().createGeneralScheduledExecutorService(conf); - ThreadPools.watchCriticalScheduledTask(fatePoolWatcher.schedule(() -> { + ThreadPools.watchCriticalScheduledTask(fatePoolWatcher.scheduleWithFixedDelay(() -> { // resize the pool if the property changed ThreadPools.resizePool(pool, conf, Property.MANAGER_FATE_THREADPOOL_SIZE); // If the pool grew, then ensure that there is a TransactionRunner for each thread @@@ -261,8 -268,8 +261,8 @@@ } } } - }, 3, SECONDS)); + }, 3, 30, SECONDS)); - executor = pool; + this.executor = pool; } // get a transaction id back to the requester before doing any work