From 2e5a7e51d0e8a31ca3f14865e064b1ef6e2c067c Mon Sep 17 00:00:00 2001 From: bobhan1 Date: Fri, 28 Aug 2026 18:32:56 +0800 Subject: [PATCH] [fix](file cache) Avoid accessing expired HDFS profile during prefetch --- be/src/io/fs/hdfs_file_reader.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/be/src/io/fs/hdfs_file_reader.cpp b/be/src/io/fs/hdfs_file_reader.cpp index 505a2da1976343..ab4f007d16c681 100644 --- a/be/src/io/fs/hdfs_file_reader.cpp +++ b/be/src/io/fs/hdfs_file_reader.cpp @@ -32,6 +32,7 @@ #include "cpp/sync_point.h" #include "io/fs/err_utils.h" #include "io/hdfs_util.h" +#include "io/io_common.h" #include "runtime/file_scan_profile.h" #include "runtime/thread_context.h" #include "runtime/workload_management/io_throttle.h" @@ -121,7 +122,8 @@ Status HdfsFileReader::close() { Status HdfsFileReader::read_at_impl(size_t offset, Slice result, size_t* bytes_read, const IOContext* io_ctx) { - SCOPED_TIMER(_total_read_time); + auto* read_timer = io_ctx != nullptr && io_ctx->is_dryrun ? nullptr : _total_read_time; + SCOPED_TIMER(read_timer); auto st = do_read_at_impl(offset, result, bytes_read, io_ctx); if (!st.ok()) { _handle = nullptr;