You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/12/05 10:48:18 UTC

[GitHub] [nifi-minifi-cpp] lordgamez commented on a diff in pull request #1465: MINIFICPP-1975 Volatile and persistent combination of repositories should be avoided

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


##########
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:
   I suppose it there is also an `isNoop` function for repositories an `isVolatile` could also be introduced as well. @szaszm what do you think?



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org