branch-4.0: [Profile][exec] The profile hitcache not correct in force refresh and sink id not correct #62645#62817
Open
github-actions[bot] wants to merge 1 commit intobranch-4.0from
Open
Conversation
… sink id not correct (#62645) Two profile correctness issues were fixed: 1. **RESULT_SINK / OLAP_TABLE_SINK node_id incorrect**: `ResultSinkOperatorX`, `OlapTableSinkOperatorX`, and `OlapTableSinkV2OperatorX` were all passing `std::numeric_limits<int>::max()` (2147483647) as their `node_id`, so the profile showed `RESULT_SINK_OPERATOR(id=2147483647)` instead of a meaningful id. The fix derives `node_id` as `child_node_id + 1` (the `node_id` of the last operator on the pipeline plus one), and threads it through the constructors, so the profile now displays a correct, readable id. 2. **CacheSourceOperator `HitCache` profile incorrect on force-refresh**: When `force_refresh_query_cache = true`, the cache is looked up but its result is intentionally discarded. Previously `HitCache` was set to `true` even in this case, misleading the profile. The fix moves the `add_info_string("HitCache", ...)` call to after the `force_refresh` check, so the reported value reflects whether the cache was actually *used*. ### Release note None ### Check List (For Author) - Test - [x] Manual test (verified profile output shows correct node id and HitCache value) - Behavior changed: - [x] Yes. Profile `id=` for RESULT_SINK / OLAP_TABLE_SINK operators now shows a correct child node_id+1 instead of 2147483647. The `HitCache` profile field now correctly reports `false` when `force_refresh_query_cache=true`. - Does this need documentation? - [x] No.
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
|
run buildall |
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
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.
Cherry-picked from #62645