This is an automated email from the ASF dual-hosted git repository. martinzink pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 85d09e4c527343c4736d0d059e010c670d132ee8 Author: Marton Szasz <sza...@apache.org> AuthorDate: Thu Dec 15 16:38:51 2022 +0100 MINIFICPP-2015 increase default thread count to 5 In the flow engine thread pool. Closes #1475 Signed-off-by: Martin Zink <martinz...@apache.org> --- conf/minifi.properties | 1 + libminifi/src/FlowController.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/conf/minifi.properties b/conf/minifi.properties index 8dc746e6c..491a94016 100644 --- a/conf/minifi.properties +++ b/conf/minifi.properties @@ -18,6 +18,7 @@ nifi.flow.configuration.file=./conf/config.yml nifi.administrative.yield.duration=30 sec # If a component has no work to do (is "bored"), how long should we wait before checking again for work? nifi.bored.yield.duration=100 millis +#nifi.flow.engine.threads=5 # Comma separated path for the extension libraries. Relative path is relative to the minifi executable. nifi.extension.path=../extensions/* diff --git a/libminifi/src/FlowController.cpp b/libminifi/src/FlowController.cpp index 2f82fe8aa..87ea88853 100644 --- a/libminifi/src/FlowController.cpp +++ b/libminifi/src/FlowController.cpp @@ -58,7 +58,7 @@ FlowController::FlowController(std::shared_ptr<core::Repository> provenance_repo running_(false), updating_(false), initialized_(false), - thread_pool_(2, false, nullptr, "Flowcontroller threadpool") { + thread_pool_(5, false, nullptr, "Flowcontroller threadpool") { if (provenance_repo_ == nullptr) throw std::runtime_error("Provenance Repo should not be null"); if (flow_file_repo_ == nullptr) @@ -315,7 +315,7 @@ void FlowController::load(std::unique_ptr<core::ProcessGroup> root, bool reload) if (!thread_pool_.isRunning() || reload) { thread_pool_.shutdown(); - thread_pool_.setMaxConcurrentTasks(configuration_->getInt(Configure::nifi_flow_engine_threads, 2)); + thread_pool_.setMaxConcurrentTasks(configuration_->getInt(Configure::nifi_flow_engine_threads, 5)); thread_pool_.setControllerServiceProvider(this); thread_pool_.start(); }