fgerlits commented on code in PR #1485:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1485#discussion_r1094756870


##########
libminifi/include/core/repository/FileSystemRepository.h:
##########
@@ -22,39 +22,31 @@
 #include <string>
 #include <utility>
 
-#include "core/Core.h"
 #include "../ContentRepository.h"
 #include "properties/Configure.h"
 #include "core/logging/LoggerFactory.h"
 
 namespace org::apache::nifi::minifi::core::repository {
 
-/**
- * FileSystemRepository is a content repository that stores data onto the 
local file system.
- */

Review Comment:
   This comment is not as useless as the others, since it is not obvious from 
the class name that this is content repo.  I would keep it.



##########
libminifi/src/core/repository/VolatileRepository.cpp:
##########
@@ -23,16 +23,144 @@
 #include <vector>
 #include "FlowFileRecord.h"
 
-namespace org {
-namespace apache {
-namespace nifi {
-namespace minifi {
-namespace core {
-namespace repository {
-
-} /* namespace repository */
-} /* namespace core */
-} /* namespace minifi */
-} /* namespace nifi */
-} /* namespace apache */
-} /* namespace org */
+namespace org::apache::nifi::minifi::core::repository {
+
+void VolatileRepository::loadComponent(const 
std::shared_ptr<core::ContentRepository>& /*content_repo*/) {
+}
+
+VolatileRepository::~VolatileRepository() {
+  for (auto ent : repo_data_.value_vector) {
+    delete ent;
+  }
+}

Review Comment:
   I think this should be in `~VolatileRepositoryData`



##########
libminifi/src/core/repository/VolatileContentRepository.cpp:
##########
@@ -45,10 +48,10 @@ bool VolatileContentRepository::initialize(const 
std::shared_ptr<Configure> &con
     }
   }
   if (!minimize_locking_) {
-    for (auto ent : value_vector_) {
+    for (auto ent : repo_data_.value_vector) {
       delete ent;
     }
-    value_vector_.clear();
+    repo_data_.value_vector.clear();

Review Comment:
   I would move this to `VolatileRepositoryData` as a new `clear()` function.



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