From d390c2d93663cda55071d78e803bd71904046f92 Mon Sep 17 00:00:00 2001 From: Dmitri Petrov Date: Mon, 11 Dec 2023 21:49:24 +0000 Subject: [PATCH] Revert "Add counters for SST File reads/blocks in MultiGet." This reverts commit a6350796dfef212dda597b36178b2b9b082107e4. --- db/version_set.cc | 30 ------------------------------ include/rocksdb/statistics.h | 9 --------- monitoring/statistics.cc | 8 +------- 3 files changed, 1 insertion(+), 46 deletions(-) diff --git a/db/version_set.cc b/db/version_set.cc index 37ba0b73d9d..a6b772948ea 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -2521,17 +2521,9 @@ void Version::MultiGet(const ReadOptions& read_options, MultiGetRange* range, if (fp.GetHitFileLevel() == 0) { dump_stats_for_l0_file = true; } - // RocksDB-Cloud contribution begin - RecordTick(db_statistics_, MULTIGET_SST_FILE_READ_COUNT, 1); - // RocksDB-Cloud contribution end } if (s.ok()) { f = fp.GetNextFileInLevel(); - // RocksDB-Cloud contribution begin - if (f) { - RecordTick(db_statistics_, MULTIGET_SST_SERIALIZED_FILE_READ_COUNT, 1); - } - // RocksDB-Cloud contribution end } #if USE_COROUTINES } else { @@ -2575,9 +2567,6 @@ void Version::MultiGet(const ReadOptions& read_options, MultiGetRange* range, if (mget_tasks.size() > 0) { RecordTick(db_statistics_, MULTIGET_COROUTINE_COUNT, mget_tasks.size()); - // RocksDB-Cloud contribution begin - RecordTick(db_statistics_, MULTIGET_SST_FILE_READ_COUNT, mget_tasks.size()); - // RocksDB-Cloud contribution end // Collect all results so far std::vector statuses = folly::coro::blockingWait( folly::coro::collectAllRange(std::move(mget_tasks)) @@ -2593,12 +2582,6 @@ void Version::MultiGet(const ReadOptions& read_options, MultiGetRange* range, if (s.ok() && fp.KeyMaySpanNextFile()) { f = fp.GetNextFileInLevel(); - // RocksDB-Cloud contribution begin - if (f) { - RecordTick(db_statistics_, - MULTIGET_SST_SERIALIZED_FILE_READ_COUNT, 1); - } - // RocksDB-Cloud contribution end } } #endif // USE_COROUTINES @@ -2780,10 +2763,6 @@ Status Version::ProcessBatch( table_handle, std::get<0>(stat->second), std::get<1>(stat->second), std::get<2>(stat->second)); - // RocksDB-Cloud contribution begin - RecordTick(db_statistics_, - MULTIGET_SST_FILE_READ_COUNT, mget_tasks.size()); - // RocksDB-Cloud contribution end } else { mget_tasks.emplace_back(MultiGetFromSSTCoroutine( read_options, file_range, fp.GetHitFileLevel(), skip_filters, @@ -2874,10 +2853,6 @@ Status Version::MultiGetAsync( if (mget_tasks.size() > 0) { assert(waiting.size()); RecordTick(db_statistics_, MULTIGET_COROUTINE_COUNT, mget_tasks.size()); - // RocksDB-Cloud contribution begin - RecordTick(db_statistics_, - MULTIGET_SST_FILE_READ_COUNT, mget_tasks.size()); - // RocksDB-Cloud contribution end // Collect all results so far std::vector statuses = folly::coro::blockingWait( folly::coro::collectAllRange(std::move(mget_tasks)) @@ -2904,11 +2879,6 @@ Status Version::MultiGetAsync( // and no need to prepare the next level. if (!fp.GetHitFile() && !fp.GetRange().empty()) { fp.PrepareNextLevelForSearch(); - } else { - // RocksDB-Cloud contribution begin - RecordTick(db_statistics_, - MULTIGET_SST_SERIALIZED_FILE_READ_COUNT, 1); - // RocksDB-Cloud contribution end } } to_process.swap(waiting); diff --git a/include/rocksdb/statistics.h b/include/rocksdb/statistics.h index cae36be882d..42a938f30c4 100644 --- a/include/rocksdb/statistics.h +++ b/include/rocksdb/statistics.h @@ -452,15 +452,6 @@ enum Tickers : uint32_t { READ_ASYNC_MICROS, // Number of errors returned to the async read callback ASYNC_READ_ERROR_COUNT, - - // RocksDB-Cloud contribution begin - - // Total number of files read in MultiGet operations - MULTIGET_SST_FILE_READ_COUNT, - // Number of times file reads were serialized behind other reads - MULTIGET_SST_SERIALIZED_FILE_READ_COUNT, - - // RocksDB-Cloud contribution end TICKER_ENUM_MAX }; diff --git a/monitoring/statistics.cc b/monitoring/statistics.cc index 4178a3072b6..e01eed3f381 100644 --- a/monitoring/statistics.cc +++ b/monitoring/statistics.cc @@ -235,13 +235,7 @@ const std::vector> TickersNameMap = { {BLOB_DB_CACHE_BYTES_READ, "rocksdb.blobdb.cache.bytes.read"}, {BLOB_DB_CACHE_BYTES_WRITE, "rocksdb.blobdb.cache.bytes.write"}, {READ_ASYNC_MICROS, "rocksdb.read.async.micros"}, - {ASYNC_READ_ERROR_COUNT, "rocksdb.async.read.error.count"}, - // RocksDB-Cloud contribution begin - {MULTIGET_SST_FILE_READ_COUNT, "rodksdb.number.multiget.sst_file_reads"}, - {MULTIGET_SST_SERIALIZED_FILE_READ_COUNT, - "rocksdb.number.multiget.sst_serialized_file_reads"} - // RocksDB-Cloud contribution end - }; + {ASYNC_READ_ERROR_COUNT, "rocksdb.async.read.error.count"}}; const std::vector> HistogramsNameMap = { {DB_GET, "rocksdb.db.get.micros"},