Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Add counters for SST File reads/blocks in MultiGet." #309

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions db/version_set.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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<Status> statuses = folly::coro::blockingWait(
folly::coro::collectAllRange(std::move(mget_tasks))
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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<Status> statuses = folly::coro::blockingWait(
folly::coro::collectAllRange(std::move(mget_tasks))
Expand All @@ -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);
Expand Down
9 changes: 0 additions & 9 deletions include/rocksdb/statistics.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down
8 changes: 1 addition & 7 deletions monitoring/statistics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,7 @@ const std::vector<std::pair<Tickers, std::string>> 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<std::pair<Histograms, std::string>> HistogramsNameMap = {
{DB_GET, "rocksdb.db.get.micros"},
Expand Down
Loading