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

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Cherry-picked from #70305 to `branch-4.2`.
   
   Local-only runtime filters can unnecessarily populate global merge metadata, 
retaining the merge backend's `QueryContext` and delaying its final profile 
report even though no global merge RPC is expected.
   
   This change computes eligibility across the complete distributed plan and 
omits global merge maps for eligible non-recursive queries without remote 
runtime-filter targets. Remote or mixed filters, recursive CTEs, incomplete 
plans, and distinct workers sharing a BRPC endpoint retain the existing 
metadata. Merge addresses, TopN descriptors, and plan-node local runtime 
filters are preserved. There are no BE lifecycle or Thrift protocol changes; 
remote-filter context retention is unchanged.
   
   #### Backport adaptations
   
   - Preserve existing `branch-4.2` FE tests and use Java 8-compatible 
`ImmutableList` factories in the added coverage.
   - Disable runtime-filter pruning only in the profile regression so its small 
fixture actually generates runtime filters. Keep the RF/Exchange assertions, 
expected results, and original 10-second profile completion deadline.
   
   ### Release note
   
   Avoid unnecessary query-context retention and delayed final profile 
reporting for eligible local-only runtime-filter queries.
   
   ### Check List (For Author)
   
   - Test:
       - [x] Unit Test
       - [x] Regression test
   - Behavior changed:
       - [x] Yes. Omit unnecessary global RF merge maps only when the complete 
query plan is eligible.
   - Does this need documentation?
       - [x] No.
   
   #### Validation
   
   - `./run-fe-ut.sh --run 
org.apache.doris.qe.runtime.ThriftPlansBuilderTest,org.apache.doris.qe.runtime.RuntimeFiltersThriftBuilderTest`:
 10 tests passed (7 + 3); no failures, errors, or skips.
   - `cd fe && mvn -pl fe-common,fe-core -am checkstyle:check 
-Dcheckstyle.skip=false`: passed.
   - `./build.sh --be --fe -j 48`: passed.
   - `./run-regression-test.sh --conf <isolated-conf> --run -d 
query_profile,recursive_cte -s rf_merge_context_profile,rf_merge_context_reuse 
-parallel 1`: 2 suites passed; no failures or skips. `<isolated-conf>` denotes 
the worktree-specific configuration.
   - Final diff whitespace and backport completeness checks passed.
   
   SQL/Profile validation used a single BE with native internal-table execution 
and Java extension support disabled. Multi-BE, mixed-version, and full CI 
validation have not been run.


-- 
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