You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "lordgamez (via GitHub)" <gi...@apache.org> on 2023/03/10 11:11:00 UTC

[GitHub] [nifi-minifi-cpp] lordgamez commented on a diff in pull request #1490: MINIFICPP-2022 Add valid repository size metrics for all repositories

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


##########
extensions/rocksdb-repos/ProvenanceRepository.cpp:
##########
@@ -145,9 +112,12 @@ void ProvenanceRepository::destroy() {
 }
 
 uint64_t ProvenanceRepository::getKeyCount() const {
+  auto opendb = db_->open();
+  if (!opendb) {
+    return 0;
+  }
   std::string key_count;
-  db_->GetProperty("rocksdb.estimate-num-keys", &key_count);
-
+  opendb->GetProperty("rocksdb.estimate-num-keys", &key_count);

Review Comment:
   Good point, as it was only used in tests, removed this in 2c1c6841b84cd569185323665d9d927a029396e9



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