Skip to content
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
3 changes: 1 addition & 2 deletions be/src/io/cache/cached_remote_file_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Status CachedRemoteFileReader::read_at_impl(size_t offset, Slice result, size_t*
ReadStatistics stats;
MonotonicStopWatch read_at_sw;
read_at_sw.start();
stats.bytes_read += bytes_req;
auto defer_func = [&](int*) {
if (config::print_stack_when_cache_miss) {
if (io_ctx->file_cache_stats == nullptr && !stats.hit_cache && !io_ctx->is_warmup) {
Expand All @@ -174,7 +175,6 @@ Status CachedRemoteFileReader::read_at_impl(size_t offset, Slice result, size_t*
}
};
std::unique_ptr<int, decltype(defer_func)> defer((int*)0x01, std::move(defer_func));
stats.bytes_read += bytes_req;
if (_is_doris_table && config::enable_read_cache_file_directly) {
// read directly
SCOPED_RAW_TIMER(&stats.read_cache_file_directly_timer);
Expand Down Expand Up @@ -419,7 +419,6 @@ void CachedRemoteFileReader::_update_stats(const ReadStatistics& read_stats,
statis->inverted_index_remote_io_timer += read_stats.remote_read_timer;
}

g_skip_cache_num << read_stats.skip_cache;
g_skip_cache_sum << read_stats.skip_cache;
}

Expand Down
3 changes: 3 additions & 0 deletions be/src/vec/exec/scan/new_olap_scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,9 @@ void NewOlapScanner::update_realtime_counters() {
_query_statistics->add_scan_bytes_from_remote_storage(
stats.file_cache_stats.bytes_read_from_remote);
}

io::FileCacheProfileReporter cache_profile(local_state->_segment_profile.get());
cache_profile.update(&stats.file_cache_stats);
DorisMetrics::instance()->query_scan_bytes_from_local->increment(
stats.file_cache_stats.bytes_read_from_local);
DorisMetrics::instance()->query_scan_bytes_from_remote->increment(
Expand Down
Loading