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

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: #70305
   
   Cherry-picked from #70305 (commit 512b9cbde76d19b9f4735c177a728929350501d6).
   
   Local-only runtime filters do not send global merge RPCs, but their global 
merge metadata can still cause the BE to retain the QueryContext until its 
timeout. This can delay final query profile reporting.
   
   This branch-4.1 backport omits unnecessary global merge metadata for 
eligible local-only queries. It does not change the delayed lifetime of remote 
runtime-filter contexts.
   
   ### Changes
   
   - Compute the omission decision once for the whole query and pass it to each 
worker's Thrift parameter builder.
   - Preserve the existing metadata for remote or mixed runtime filters, 
recursive CTEs, empty or incomplete plans, and distinct workers sharing one 
BRPC endpoint.
   - Keep the merge address, TopN metadata, and plan-node runtime-filter 
descriptions unchanged. No BE code or Thrift schema changes are required.
   - Preserve the source regression assertions and expected results. Adapt 
unit-test collections to Java 8 with `ImmutableList.of`, and explicitly disable 
runtime-filter pruning in the profile fixture so its tiny input exercises the 
intended RF path.
   
   ### Validation
   
   - `./build.sh --be --fe -j 48`: passed; BE Java extensions were disabled for 
this build.
   - `./run-fe-ut.sh --run 
org.apache.doris.qe.runtime.ThriftPlansBuilderTest,org.apache.doris.qe.runtime.RuntimeFiltersThriftBuilderTest`:
 10 tests passed, with no failures, errors, or skips.
   - `(cd fe && mvn -o -B validate -pl fe-common,fe-core -am -DskipTests)`: 
passed with zero Checkstyle violations.
   - `./run-regression-test.sh --compile`: passed.
   - SQL/Profile regression suites `rf_merge_context_profile` and 
`rf_merge_context_reuse`: both passed in two consecutive runs using the same 
isolated configuration. Each run reported 2 successful suites, 0 failures, 0 
fatal scripts, and 0 skips. The local-only profile completion assertion retains 
its 10-second limit.
   - `git diff --check`: passed.
   
   Runtime validation used a single FE and a single BE. Multi-BE and 
mixed-version deployments were not tested.
   
   ### Release note
   
   Fix delayed final profile reporting for eligible local-only runtime-filter 
queries.
   
   ### Check List (For Author)
   
   - Test:
       - [x] Regression test
       - [x] Unit Test
   - Behavior changed:
       - [x] Yes: eligible local-only queries no longer retain unnecessary 
global merge state; query results are unchanged.
   - 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