HappenLee opened a new pull request, #62645:
URL: https://github.com/apache/doris/pull/62645

    [fix](be) Fix incorrect HitCache profile in force refresh and sink operator 
node_id
   
    ### What problem does this PR solve?
   
    Issue Number: close #xxx
   
    Related PR: #xxx
   
    Problem Summary:
    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.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to