[fix](file cache) Avoid accessing expired HDFS profile during prefetch - #67293
Open
bobhan1 wants to merge 1 commit into
Open
[fix](file cache) Avoid accessing expired HDFS profile during prefetch#67293bobhan1 wants to merge 1 commit into
bobhan1 wants to merge 1 commit into
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
bobhan1
marked this pull request as ready for review
August 28, 2026 10:35
Contributor
Author
|
run buildall |
gavinchou
approved these changes
Aug 28, 2026
Contributor
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
gavinchou
self-requested a review
August 30, 2026 12:51
gavinchou
reviewed
Aug 30, 2026
| 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; |
Contributor
There was a problem hiding this comment.
seems read_timer may still endup with nullptr?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: DORIS-28268
Related PR: None
Problem Summary:
CachedRemoteFileReader::prefetch_range()submits fire-and-forget dry-run tasks. A running task keeps the cached reader and its underlyingHdfsFileReaderalive, but it does not keep the queryRuntimeProfilealive.HdfsFileReader::read_at_impl()previously always updated_total_read_time, so a delayed prefetch read could access that counter after the query profile had been freed.Skip the query-profile timer for dry-run reads. Normal HDFS reads keep their existing profile accounting, and prefetch/cache-population behavior is unchanged.
Release note
None
Check List (For Author)
Test
./build.sh --be -j100is running; the result will be updated after completion.Behavior changed:
HdfsIOtimer; data reads and file-cache population are unchanged.Does this need documentation?
Check List (For Reviewer who merge this PR)