Skip to content

Commit 2e5a7e5

Browse files
committed
[fix](file cache) Avoid accessing expired HDFS profile during prefetch
1 parent a58bf40 commit 2e5a7e5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

be/src/io/fs/hdfs_file_reader.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "cpp/sync_point.h"
3333
#include "io/fs/err_utils.h"
3434
#include "io/hdfs_util.h"
35+
#include "io/io_common.h"
3536
#include "runtime/file_scan_profile.h"
3637
#include "runtime/thread_context.h"
3738
#include "runtime/workload_management/io_throttle.h"
@@ -121,7 +122,8 @@ Status HdfsFileReader::close() {
121122

122123
Status HdfsFileReader::read_at_impl(size_t offset, Slice result, size_t* bytes_read,
123124
const IOContext* io_ctx) {
124-
SCOPED_TIMER(_total_read_time);
125+
auto* read_timer = io_ctx != nullptr && io_ctx->is_dryrun ? nullptr : _total_read_time;
126+
SCOPED_TIMER(read_timer);
125127
auto st = do_read_at_impl(offset, result, bytes_read, io_ctx);
126128
if (!st.ok()) {
127129
_handle = nullptr;

0 commit comments

Comments
 (0)