adamdebreceni commented on code in PR #1497:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1497#discussion_r1093282405


##########
libminifi/src/FlowController.cpp:
##########
@@ -205,13 +177,12 @@ int16_t FlowController::stop() {
      * -Stopping the schedulers doesn't actually quit the onTrigger functions 
of processors
      * -They only guarantee that the processors are not scheduled anymore
      * -After the threadpool is stopped we can make sure that processors don't 
need repos and controllers anymore */
-    if (this->root_) {
-      this->root_->drainConnections();
-    }
+    root_wrapper_.drainConnections();
     this->flow_file_repo_->stop();
     this->provenance_repo_->stop();
     // stop the ControllerServices
     disableAllControllerServices();
+    initialized_ = false;

Review Comment:
   although `unload` is equivalent to calling `stop` and setting 
`initialized_`, conceptually the flow controller has the following state 
transitions: `empty` -(`load`)-> `initialized` -(`start`)-> `running` 
-(`stop`)-> `initialized` -(`unload`)-> `empty`
   
   IMO we should either keep `unload` even if it can be inlined, or also remove 
`load`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to