mapleFU commented on code in PR #2242:
URL: https://github.com/apache/kvrocks/pull/2242#discussion_r1564104277


##########
src/server/server.cc:
##########
@@ -846,13 +846,18 @@ void Server::GetRocksDBInfo(std::string *info) {
   db->GetAggregatedIntProperty("rocksdb.num-live-versions", 
&num_live_versions);
 
   string_stream << "# RocksDB\r\n";
+
+  uint64_t block_cache_usage = 0;
+  // All column families share the same block cache, so it's good to count a 
single one.
+  auto cf_handle = storage->GetCFHandle(engine::kSubkeyColumnFamilyName);
+  db->GetIntProperty(cf_handle, "rocksdb.block-cache-usage", 
&block_cache_usage);
+  string_stream << "block_cache_usage:" << block_cache_usage << "\r\n";
+
   for (const auto &cf_handle : *storage->GetCFHandles()) {
-    uint64_t estimate_keys = 0, block_cache_usage = 0, 
block_cache_pinned_usage = 0, index_and_filter_cache_usage = 0;
+    uint64_t estimate_keys = 0, block_cache_pinned_usage = 0, 
index_and_filter_cache_usage = 0;

Review Comment:
   Quick question: would `block_cache_pinned_usage` be shared?



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