[feature](query) Support session level force_forward_all_queries - #66691
Open
yujun777 wants to merge 1 commit into
Open
[feature](query) Support session level force_forward_all_queries#66691yujun777 wants to merge 1 commit into
yujun777 wants to merge 1 commit into
Conversation
Add a session variable force_forward_all_queries so that a session can force all its queries to be forwarded to the master FE, without enabling the cluster-wide Config.force_forward_all_queries. A query is forwarded when either the config or the session variable is enabled. Key changes: - Add session variable force_forward_all_queries (default false) - Forward queries when Config.force_forward_all_queries or the session variable is enabled - Add unit test ForceForwardAllQueriesTest Unit Test: - ForceForwardAllQueriesTest passed (4 scenarios) - Full FE build with checkstyle passed
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
morrySnow
approved these changes
Aug 12, 2026
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
Contributor
TPC-H: Total hot run time: 28651 ms |
Contributor
TPC-DS: Total hot run time: 157467 ms |
Contributor
FE UT Coverage ReportIncrement line coverage `` 🎉 |
Contributor
ClickBench: Total hot run time: 23.8 s |
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.
What problem does this PR solve?
Problem Summary:
Some users query a freshness/health-check on a follower FE before every business request. When the follower is replaying a large journal, the freshness query result can lag and trigger business degradation.
Config.force_forward_all_queries = trueforces all queries to the master, but it is cluster-wide and too coarse when clients connect through a load balancer. The existing session variableforward_to_masterdoes not participate in the ordinary SELECT forwarding decision.This PR adds a session-level variable
force_forward_all_queries. A query is forwarded to the master when eitherConfig.force_forward_all_queriesor the session variable is enabled, so only the freshness queries need to opt in.Release note
Added a session variable
force_forward_all_queriesto force queries of the session to be forwarded to the master FE.Check List (For Author)
ForceForwardAllQueriesTest(4 scenarios: session/config on/off combinations, passed)