Skip to content

branch-4.1: [feature](runtime-filter) Add adaptive global runtime filter tree publish - #65599

Merged
yiguolei merged 1 commit into
apache:branch-4.1from
BiteTheDDDDt:codex/pick-64851-branch-4.1
Jul 17, 2026
Merged

branch-4.1: [feature](runtime-filter) Add adaptive global runtime filter tree publish#65599
yiguolei merged 1 commit into
apache:branch-4.1from
BiteTheDDDDt:codex/pick-64851-branch-4.1

Conversation

@BiteTheDDDDt

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: None

Related PR: #64851

Problem Summary: Backport #64851 to branch-4.1. Large global runtime filters are currently published directly from the merge coordinator to every scan target, causing repeated large RPC attachments. This backport adds adaptive tree publish controlled by runtime_filter_tree_publish_max_send_bytes.

The branch-4.1 adaptation keeps its DummyBrpcCallback and query-context lifetime model, and falls back to direct publish for legacy targets without fragment IDs. The TQueryOptions field keeps master field id 225 for wire compatibility.

Release note

Add session variable runtime_filter_tree_publish_max_send_bytes to control adaptive global runtime filter tree publish. Set it to 0 to disable tree publish.

Check List (For Author)

  • Test:
    • Generated Thrift and protobuf sources with ./generated-source.sh noclean
    • ./run-fe-ut.sh --run org.apache.doris.qe.SessionVariablesTest
      • 9 tests passed, 0 failures, 0 errors
    • runtime_filter_mgr.cpp and internal_service.cpp passed -fsyntax-only with the branch-4.1 release compile commands
    • clang-format --dry-run --Werror on all changed C++ files
    • git diff --check upstream/branch-4.1..HEAD
  • Behavior changed: Yes. Large global runtime filters can be relayed through an adaptive publish tree instead of direct coordinator fanout.
  • Does this need documentation: No

@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@BiteTheDDDDt

Copy link
Copy Markdown
ContributorAuthor

run buildall

@BiteTheDDDDt
BiteTheDDDDt marked this pull request as ready for review July 14, 2026 11:00
@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage77.35% (1888/2441)
Line Coverage64.38% (33891/52639)
Region Coverage64.91% (17485/26936)
Branch Coverage54.07% (9366/17322)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 18.18% (2/11) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 25.82% (55/213) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage54.91% (21062/38359)
Line Coverage38.39% (201821/525687)
Region Coverage34.80% (158621/455765)
Branch Coverage35.80% (69284/193550)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 50.70% (108/213) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage72.20% (27063/37483)
Line Coverage55.32% (289417/523191)
Region Coverage52.62% (241459/458909)
Branch Coverage53.88% (104436/193846)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 54.55% (6/11) 🎉
Increment coverage report
Complete coverage report

…lish
Issue Number: N/A
Related PR: N/A
Problem Summary: Global runtime filters are currently published from the merge coordinator directly to every scan target. When a merged filter is large and the cluster has many BEs, the coordinator sends many large duplicate RPC attachments. This change adds adaptive tree publish for global runtime filters so each relay node forwards a bounded number of copies based on runtime_filter_tree_publish_max_send_bytes.
Add runtime_filter_tree_publish_max_send_bytes session variable to control adaptive global runtime filter tree publish. Set it to 0 to disable tree publish.
- Test:
- Manual test: git diff --cached --check
- Manual test: build-support/check-format.sh
- Manual test: DORIS_HOME=/mnt/disk8/xiaolei/codespaces/doris2 DORIS_THIRDPARTY=/mnt/disk8/xiaolei/codespaces/doris2/thirdparty ninja -C be/build_Release src/exec/CMakeFiles/Exec.dir/runtime_filter/runtime_filter_mgr.cpp.o src/service/CMakeFiles/Service.dir/internal_service.cpp.o
- Manual test: ./build.sh --fe
- Behavior changed: Yes. Large global runtime filters can be published through an adaptive relay tree instead of direct coordinator fanout.
- Does this need documentation: No
(cherry picked from commit 75171cb)
@BiteTheDDDDt
BiteTheDDDDtforce-pushed the codex/pick-64851-branch-4.1 branch from 81e4bdb to df01110CompareJuly 15, 2026 06:39
@BiteTheDDDDt

Copy link
Copy Markdown
ContributorAuthor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 25.82% (55/213) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage54.95% (21082/38367)
Line Coverage38.41% (201987/525821)
Region Coverage34.80% (158632/455854)
Branch Coverage35.81% (69305/193556)

@yiguolei

Copy link
Copy Markdown
Contributor

skip buildall

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@yiguolei
yiguolei merged commit f084c0a into apache:branch-4.1Jul 17, 2026
31 of 34 checks passed
@yiguoleiyiguolei mentioned this pull request Sep 1, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@BiteTheDDDDt@hello-stephen@yiguolei