You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ab...@apache.org on 2020/05/18 11:52:24 UTC

[nifi-minifi-cpp] branch master updated: MINIFICPP-1216 - Controller Services Integration test is unstable

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

aboda pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git


The following commit(s) were added to refs/heads/master by this push:
     new abf74c3  MINIFICPP-1216 - Controller Services Integration test is unstable
abf74c3 is described below

commit abf74c3759c4feb0b6e4a6641133b5aae11e18cd
Author: Arpad Boda <ab...@apache.org>
AuthorDate: Thu May 7 00:57:05 2020 +0200

    MINIFICPP-1216 - Controller Services Integration test is unstable
    
    Signed-off-by: Arpad Boda <ab...@apache.org>
    
    Approved by szaszm on GH
    
    This closes #777
---
 libminifi/src/FlowController.cpp | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/libminifi/src/FlowController.cpp b/libminifi/src/FlowController.cpp
index 1cff30e..071d9b4 100644
--- a/libminifi/src/FlowController.cpp
+++ b/libminifi/src/FlowController.cpp
@@ -242,15 +242,19 @@ int16_t FlowController::stop(bool force, uint64_t timeToWait) {
     logger_->log_info("Stop Flow Controller");
     if (this->root_)
       this->root_->stopProcessing(timer_scheduler_, event_scheduler_, cron_scheduler_);
-    this->flow_file_repo_->stop();
-    this->provenance_repo_->stop();
     // stop after we've attempted to stop the processors.
     this->timer_scheduler_->stop();
     this->event_scheduler_->stop();
     this->cron_scheduler_->stop();
+    thread_pool_.shutdown();
+    /* STOP! Before you change it, consider the following:
+     * -Stopping the schedulers doesn't actually quit the onTrigger functions of processors
+     * -They only guarantee that the processors are not scheduled any more
+     * -After the threadpool is stopped we can make sure that processors don't need repos and controllers anymore */
+    this->flow_file_repo_->stop();
+    this->provenance_repo_->stop();
     // stop the ControllerServices
     this->controller_service_provider_->disableAllControllerServices();
-    thread_pool_.shutdown();
     running_ = false;
   }
   return 0;