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

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

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


##########
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:
   is this different from `getRepositoryEntryCount`?



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