lordgamez commented on code in PR #2157:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2157#discussion_r3093758941


##########
libminifi/src/core/ProcessContextImpl.cpp:
##########
@@ -166,10 +166,17 @@ bool ProcessContextImpl::isRunning() const {
   return getProcessor().isRunning();
 }
 
-StateManager* ProcessContextImpl::getStateManager() {
+std::unique_ptr<StateManager> ProcessContextImpl::createStateManager() {
   if (state_storage_ == nullptr) { return nullptr; }
-  if (!state_manager_) { state_manager_ = 
state_storage_->getStateManager(processor_); }
-  return state_manager_.get();
+  return state_storage_->createStateManager(processor_);
+}
+
+StateManager* ProcessContextImpl::getStateManager() {
+  return session_state_manager_.get();
+}

Review Comment:
   The ProcessContext has its interface with the getStateManager method 
published in the python and lua API as well, so I would keep it this way to be 
consistent as that should not change.



-- 
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