You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2022/12/15 15:50:32 UTC

[nifi-minifi-cpp] branch main updated (a8b0e0c59 -> 62061a136)

This is an automated email from the ASF dual-hosted git repository.

martinzink pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git


    from a8b0e0c59 MINIFICPP-2012 fix CWEL leak on empty domain lookup
     new 85d09e4c5 MINIFICPP-2015 increase default thread count to 5 In the flow engine thread pool.
     new 62061a136 MINIFICPP-2017 - Use std::string_view in join

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 conf/minifi.properties                                  | 1 +
 extensions/standard-processors/processors/RouteText.cpp | 6 +-----
 libminifi/src/FlowController.cpp                        | 4 ++--
 3 files changed, 4 insertions(+), 7 deletions(-)


[nifi-minifi-cpp] 02/02: MINIFICPP-2017 - Use std::string_view in join

Posted by ma...@apache.org.
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 62061a136c3966f4bbe6f79ff66ba6f7e243f4eb
Author: Adam Debreceni <ad...@apache.org>
AuthorDate: Thu Dec 15 16:41:48 2022 +0100

    MINIFICPP-2017 - Use std::string_view in join
    
    Closes #1478
    Signed-off-by: Martin Zink <ma...@apache.org>
---
 extensions/standard-processors/processors/RouteText.cpp | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/extensions/standard-processors/processors/RouteText.cpp b/extensions/standard-processors/processors/RouteText.cpp
index 98f5af206..ecb045b90 100644
--- a/extensions/standard-processors/processors/RouteText.cpp
+++ b/extensions/standard-processors/processors/RouteText.cpp
@@ -427,15 +427,11 @@ std::optional<std::string> RouteText::getGroup(const std::string_view& segment)
   if (!utils::regexMatch(segment_str, match_result, group_regex_.value())) {
     return group_fallback_;
   }
-  // WARNING!! using a temporary std::string causes the omission of delimiters
-  // in the output on Windows
-  const std::string comma = ", ";
   // unused capturing groups default to empty string
   auto to_string = [] (const auto& submatch) -> std::string {return submatch;};
   return ranges::views::tail(match_result)  // only join the capture groups
     | ranges::views::transform(to_string)
-    | ranges::views::cache1
-    | ranges::views::join(comma)
+    | ranges::views::join(std::string_view(", "))
     | ranges::to<std::string>();
 }
 


[nifi-minifi-cpp] 01/02: MINIFICPP-2015 increase default thread count to 5 In the flow engine thread pool.

Posted by ma...@apache.org.
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 <sz...@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 <ma...@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();
     }