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

   ### What problem does this PR solve?
   
   The `_query_plan` API always plans on the receiving FE. Callers that need a 
plan based on the master's metadata currently have to locate and contact the 
master themselves.
   
   Add optional `?forward=true` support using the existing forwarding helper. A 
non-master FE forwards the request to the master; omitted or false values 
retain local planning, and the master handles the request locally. Both 
existing GET and POST entry points remain supported. Forwarded query-plan 
requests use POST internally to preserve the SQL body for GET callers. Other 
APIs retain their existing forwarding method.
   
   Update the source-demo README to describe the parameter.
   
   ### Release note
   
   The `_query_plan` HTTP API now supports `?forward=true` to request planning 
on the master FE. Local planning remains the default.
   
   ### Check List (For Author)
   
   - Test:
       - [x] Unit Test
       - The simplified `TableQueryPlanActionTest#testForwardQueryPlan` passed 
both GET and POST cases with the default test JVM settings via `run-fe-ut.sh`. 
These cases check the SQL body, authorization header, query parameter, internal 
POST method, and returned response using a local HTTP server.
       - Before the test simplification, `TableQueryPlanActionTest` and 
`ForwardToMasterTest` passed all 17 cases via `run-fe-ut.sh` with 
`FE_UT_JAVA_OPTS='-XX:ActiveProcessorCount=2 -Xint'`. This also covers local 
planning choices and authentication.
       - The full suite under default JVM settings encountered four fixture 
errors (`NotAMockException` / `ClassCastException`) associated with 
`DorisHttpTestCase` replacing the static-final Env singleton through Unsafe. 
The focused forwarding cases passed under default settings.
       - Checkstyle passed with zero violations; `git diff --check` passed.
       - No live multi-FE or HTTPS cluster integration test was run.
   
   - Behavior changed:
       - [x] Yes. Explicit `forward=true` on a non-master FE forwards query 
planning to the master; the default behavior is unchanged.
   
   - Does this need documentation?
       - [x] Yes. The source-demo README is updated in this PR.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label
   


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