Summary:
MultiGet in block based table reader doesn't use BlockFetcher. As a result, the block_read_count and block_read_byte PerfContext counters were not being updated. This fixes that by updating them in MultiRead.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/8676
Reviewed By: zhichao-cao
Differential Revision:
D30428680
Pulled By: anand1976
fbshipit-source-id:
21846efe92588fc17123665dd06733693a40126d
req_offset_for_block.emplace_back(0);
}
req_idx_for_block.emplace_back(read_reqs.size());
+
+ PERF_COUNTER_ADD(block_read_count, 1);
+ PERF_COUNTER_ADD(block_read_byte, block_size(handle));
}
// Handle the last block and process the pending last request
if (prev_len != 0) {
// Execute MultiGet.
MultiGetContext::Range range = ctx.GetMultiGetRange();
+ PerfContext* perf_ctx = get_perf_context();
+ perf_ctx->Reset();
table->MultiGet(ReadOptions(), &range, nullptr);
+ ASSERT_GE(perf_ctx->block_read_count - perf_ctx->index_block_read_count -
+ perf_ctx->filter_block_read_count -
+ perf_ctx->compression_dict_block_read_count,
+ 1);
+ ASSERT_GE(perf_ctx->block_read_byte, 1);
+
for (const Status& status : statuses) {
ASSERT_OK(status);
}