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/07/11 13:28:50 UTC

[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a diff in pull request #1328: MINIFICPP-1812 - Clean up Repository threads

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


##########
controller/Controller.h:
##########
@@ -246,15 +247,24 @@ std::shared_ptr<org::apache::nifi::minifi::core::controller::ControllerService>
 
   configuration->get(org::apache::nifi::minifi::Configure::nifi_provenance_repository_class_name, prov_repo_class);
   // Create repos for flow record and provenance
-  const std::shared_ptr prov_repo = org::apache::nifi::minifi::core::createRepository(prov_repo_class, true, "provenance");
+  const std::shared_ptr prov_repo_base = org::apache::nifi::minifi::core::createRepository(prov_repo_class, true, "provenance");
+  const auto prov_repo = std::static_pointer_cast<org::apache::nifi::minifi::core::ThreadedRepository>(prov_repo_base);

Review Comment:
   `createRepository` doesn't seem to guarantee that what it returns is a `ThreadedRepository`, a `dynamic_pointer_cast` could be more appropriate in these places?



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