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

   ### What problem does this PR solve?
   
   Issue Number: CIR-21346 (internal SelectDB JIRA; no public GitHub issue yet)
   
   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 = true` forces all queries to the master, but 
it is cluster-wide and too coarse when clients connect through a load balancer. 
The existing session variable `forward_to_master` does 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 either `Config.force_forward_all_queries` or 
the session variable is enabled, so only the freshness queries need to opt in.
   
   ### Release note
   
   Added a session variable `force_forward_all_queries` to force queries of the 
session to be forwarded to the master FE.
   
   ### Check List (For Author)
   
   - Test:
       - Unit test: `ForceForwardAllQueriesTest` (4 scenarios: session/config 
on/off combinations, passed)
       - Full FE build with checkstyle passed
   - Behavior changed: Yes (new session variable, default off, no behavior 
change when disabled)
   - Does this need documentation: 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