szaszm commented on code in PR #1465:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1465#discussion_r1094621411


##########
controller/Controller.h:
##########
@@ -259,13 +261,16 @@ 
std::shared_ptr<org::apache::nifi::minifi::core::controller::ControllerService>
   if (!flow_repo) {
     throw 
org::apache::nifi::minifi::Exception(org::apache::nifi::minifi::REPOSITORY_EXCEPTION,
 "Could not create flowfile repository");
   }
-
   flow_repo->initialize(configuration);
 
-
   
configuration->get(org::apache::nifi::minifi::Configure::nifi_content_repository_class_name,
 content_repo_class);
 
   const std::shared_ptr content_repo = 
org::apache::nifi::minifi::core::createContentRepository(content_repo_class, 
true, "content");
+  const bool is_flow_repo_non_persistent = flow_repo->isNoop() || 
std::dynamic_pointer_cast<org::apache::nifi::minifi::core::repository::VolatileFlowFileRepository>(flow_repo)
 != nullptr;
+  const bool is_content_repo_non_persistent = 
std::dynamic_pointer_cast<org::apache::nifi::minifi::core::repository::VolatileContentRepository>(content_repo)
 != nullptr;

Review Comment:
   `typeid` doesn't check for inheritance. If you think this is an important 
requirement, we can keep the dynamic_cast or introduce an `isVolatile` member. 
I'm fine with both approaches, although keeping the dynamic_cast sounds simpler.



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