From e808858ae070315794a015043ed6b6389ecd8932 Mon Sep 17 00:00:00 2001 From: sdong Date: Wed, 25 Jan 2023 15:37:50 -0800 Subject: [PATCH] Remove Stats related to compressed block cache (#11135) Summary: Since compressed block cache is removed, those stats are not needed. They are removed in different PR in case there is a problem with it. The stats are removed in the same way in https://github.com/facebook/rocksdb/pull/11131/ . HISTORY.md was already updated by mistake, and it would be correct after merging this PR. Pull Request resolved: https://github.com/facebook/rocksdb/pull/11135 Test Plan: Watch CI Reviewed By: ltamasi Differential Revision: D42757616 fbshipit-source-id: bd7cb782585c8535ce5784295225c376f3011f35 --- db_stress_tool/db_stress_test_base.h | 4 ++-- include/rocksdb/statistics.h | 6 ------ java/rocksjni/portal.h | 16 --------------- .../src/main/java/org/rocksdb/TickerType.java | 20 ------------------- monitoring/statistics.cc | 5 ----- 5 files changed, 2 insertions(+), 49 deletions(-) diff --git a/db_stress_tool/db_stress_test_base.h b/db_stress_tool/db_stress_test_base.h index 32c9283a0..f145ca7dc 100644 --- a/db_stress_tool/db_stress_test_base.h +++ b/db_stress_tool/db_stress_test_base.h @@ -305,7 +305,7 @@ extern void InitializeOptionsFromFlags( // There are two cases. // Case 1: OPTIONS file is not specified. Command line arguments have been used // to initialize `options`. InitializeOptionsGeneral() will use -// `cache`, `block_cache_compressed` and `filter_policy` to initialize +// `cache` and `filter_policy` to initialize // corresponding fields of `options`. InitializeOptionsGeneral() will // also set up other fields of `options` so that stress test can run. // Examples include `create_if_missing` and @@ -316,7 +316,7 @@ extern void InitializeOptionsFromFlags( // case, if command line arguments indicate that the user wants to set // up such shared objects, e.g. block cache, compressed block cache, // row cache, filter policy, then InitializeOptionsGeneral() will honor -// the user's choice, thus passing `cache`, `block_cache_compressed`, +// the user's choice, thus passing `cache`, // `filter_policy` as input arguments. // // InitializeOptionsGeneral() must not overwrite fields of `options` loaded diff --git a/include/rocksdb/statistics.h b/include/rocksdb/statistics.h index 666d5b051..2e4f4e6c4 100644 --- a/include/rocksdb/statistics.h +++ b/include/rocksdb/statistics.h @@ -170,12 +170,6 @@ enum Tickers : uint32_t { // Record the number of calls to GetUpdatesSince. Useful to keep track of // transaction log iterator refreshes GET_UPDATES_SINCE_CALLS, - BLOCK_CACHE_COMPRESSED_MISS, // miss in the compressed block cache - BLOCK_CACHE_COMPRESSED_HIT, // hit in the compressed block cache - // Number of blocks added to compressed block cache - BLOCK_CACHE_COMPRESSED_ADD, - // Number of failures when adding blocks to compressed block cache - BLOCK_CACHE_COMPRESSED_ADD_FAILURES, WAL_FILE_SYNCED, // Number of times WAL sync is done WAL_FILE_BYTES, // Number of bytes written to WAL diff --git a/java/rocksjni/portal.h b/java/rocksjni/portal.h index 3a772d51f..82fa3b48b 100644 --- a/java/rocksjni/portal.h +++ b/java/rocksjni/portal.h @@ -4904,14 +4904,6 @@ class TickerTypeJni { return 0x40; case ROCKSDB_NAMESPACE::Tickers::GET_UPDATES_SINCE_CALLS: return 0x41; - case ROCKSDB_NAMESPACE::Tickers::BLOCK_CACHE_COMPRESSED_MISS: - return 0x42; - case ROCKSDB_NAMESPACE::Tickers::BLOCK_CACHE_COMPRESSED_HIT: - return 0x43; - case ROCKSDB_NAMESPACE::Tickers::BLOCK_CACHE_COMPRESSED_ADD: - return 0x44; - case ROCKSDB_NAMESPACE::Tickers::BLOCK_CACHE_COMPRESSED_ADD_FAILURES: - return 0x45; case ROCKSDB_NAMESPACE::Tickers::WAL_FILE_SYNCED: return 0x46; case ROCKSDB_NAMESPACE::Tickers::WAL_FILE_BYTES: @@ -5261,14 +5253,6 @@ class TickerTypeJni { return ROCKSDB_NAMESPACE::Tickers::NUMBER_OF_RESEEKS_IN_ITERATION; case 0x41: return ROCKSDB_NAMESPACE::Tickers::GET_UPDATES_SINCE_CALLS; - case 0x42: - return ROCKSDB_NAMESPACE::Tickers::BLOCK_CACHE_COMPRESSED_MISS; - case 0x43: - return ROCKSDB_NAMESPACE::Tickers::BLOCK_CACHE_COMPRESSED_HIT; - case 0x44: - return ROCKSDB_NAMESPACE::Tickers::BLOCK_CACHE_COMPRESSED_ADD; - case 0x45: - return ROCKSDB_NAMESPACE::Tickers::BLOCK_CACHE_COMPRESSED_ADD_FAILURES; case 0x46: return ROCKSDB_NAMESPACE::Tickers::WAL_FILE_SYNCED; case 0x47: diff --git a/java/src/main/java/org/rocksdb/TickerType.java b/java/src/main/java/org/rocksdb/TickerType.java index 7ab390cc7..797fb9895 100644 --- a/java/src/main/java/org/rocksdb/TickerType.java +++ b/java/src/main/java/org/rocksdb/TickerType.java @@ -312,26 +312,6 @@ public enum TickerType { */ GET_UPDATES_SINCE_CALLS((byte) 0x41), - /** - * Miss in the compressed block cache. - */ - BLOCK_CACHE_COMPRESSED_MISS((byte) 0x42), - - /** - * Hit in the compressed block cache. - */ - BLOCK_CACHE_COMPRESSED_HIT((byte) 0x43), - - /** - * Number of blocks added to compressed block cache. - */ - BLOCK_CACHE_COMPRESSED_ADD((byte) 0x44), - - /** - * Number of failures when adding blocks to compressed block cache. - */ - BLOCK_CACHE_COMPRESSED_ADD_FAILURES((byte) 0x45), - /** * Number of times WAL sync is done. */ diff --git a/monitoring/statistics.cc b/monitoring/statistics.cc index df1293c74..2c83fe05f 100644 --- a/monitoring/statistics.cc +++ b/monitoring/statistics.cc @@ -85,11 +85,6 @@ const std::vector> TickersNameMap = { {BLOOM_FILTER_PREFIX_USEFUL, "rocksdb.bloom.filter.prefix.useful"}, {NUMBER_OF_RESEEKS_IN_ITERATION, "rocksdb.number.reseeks.iteration"}, {GET_UPDATES_SINCE_CALLS, "rocksdb.getupdatessince.calls"}, - {BLOCK_CACHE_COMPRESSED_MISS, "rocksdb.block.cachecompressed.miss"}, - {BLOCK_CACHE_COMPRESSED_HIT, "rocksdb.block.cachecompressed.hit"}, - {BLOCK_CACHE_COMPRESSED_ADD, "rocksdb.block.cachecompressed.add"}, - {BLOCK_CACHE_COMPRESSED_ADD_FAILURES, - "rocksdb.block.cachecompressed.add.failures"}, {WAL_FILE_SYNCED, "rocksdb.wal.synced"}, {WAL_FILE_BYTES, "rocksdb.wal.bytes"}, {WRITE_DONE_BY_SELF, "rocksdb.write.self"},