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


##########
src/server/server.cc:
##########
@@ -847,22 +847,25 @@ void Server::GetRocksDBInfo(std::string *info) {
 
   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 subkey_cf_handle = 
storage->GetCFHandle(engine::kSubkeyColumnFamilyName);
-  db->GetIntProperty(subkey_cf_handle, "rocksdb.block-cache-usage", 
&block_cache_usage);
-  string_stream << "block_cache_usage:" << block_cache_usage << "\r\n";
+  {
+    // All column families share the same block cache, so it's good to count a 
single one.
+    uint64_t block_cache_usage = 0;
+    uint64_t block_cache_pinned_usage = 0;
+    auto subkey_cf_handle = 
storage->GetCFHandle(engine::kSubkeyColumnFamilyName);
+    db->GetIntProperty(subkey_cf_handle, 
rocksdb::DB::Properties::kBlockCacheUsage, &block_cache_usage);
+    string_stream << "block_cache_usage:" << block_cache_usage << "\r\n";
+    db->GetIntProperty(subkey_cf_handle, 
rocksdb::DB::Properties::kBlockCachePinnedUsage, &block_cache_pinned_usage);

Review Comment:
   This is a minor catchup for https://github.com/apache/kvrocks/pull/2242 . 
Since "Pinned Usage" is also 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