From 5ff7be92082410ae3ee63214cbfcb8ed6ed9a619 Mon Sep 17 00:00:00 2001 From: HenrikJannsen Date: Wed, 28 Dec 2022 12:09:59 -0500 Subject: [PATCH] Increase capacity for thread pool queue at ExportJsonFilesService One seed node using the ExportJsonFilesService had RejectedExecutionExceptions as before we had only permitted a thread pool queue capacity of 1. Signed-off-by: HenrikJannsen --- .../core/dao/node/explorer/ExportJsonFilesService.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/bisq/core/dao/node/explorer/ExportJsonFilesService.java b/core/src/main/java/bisq/core/dao/node/explorer/ExportJsonFilesService.java index 1175a264468..8ff811b440d 100644 --- a/core/src/main/java/bisq/core/dao/node/explorer/ExportJsonFilesService.java +++ b/core/src/main/java/bisq/core/dao/node/explorer/ExportJsonFilesService.java @@ -53,6 +53,7 @@ import java.util.List; import java.util.Objects; import java.util.Optional; +import java.util.concurrent.ThreadPoolExecutor; import java.util.stream.Collectors; import lombok.extern.slf4j.Slf4j; @@ -63,8 +64,7 @@ public class ExportJsonFilesService implements DaoSetupService { private final File storageDir; private final boolean dumpBlockchainData; - private final ListeningExecutorService executor = Utilities.getListeningExecutorService("JsonExporter", - 1, 1, 1200); + private final ListeningExecutorService executor; private JsonFileManager txFileManager, txOutputFileManager, bsqStateFileManager; @Inject @@ -74,6 +74,9 @@ public ExportJsonFilesService(DaoStateService daoStateService, this.daoStateService = daoStateService; this.storageDir = storageDir; this.dumpBlockchainData = dumpBlockchainData; + + ThreadPoolExecutor threadPoolExecutor = Utilities.getThreadPoolExecutor("JsonExporter", 1, 1, 20, 60); + executor = MoreExecutors.listeningDecorator(threadPoolExecutor); }