Skip to content
Open
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
4 changes: 3 additions & 1 deletion be/src/io/fs/hdfs_file_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems read_timer may still endup with nullptr?

SCOPED_TIMER(read_timer);
auto st = do_read_at_impl(offset, result, bytes_read, io_ctx);
if (!st.ok()) {
_handle = nullptr;
Expand Down
Loading