[fix](workload policy)Remove set session variable workload policy action#64856
[fix](workload policy)Remove set session variable workload policy action#64856feiniaofeiafei wants to merge 5 commits into
Conversation
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: The workload policy set_session_variable action has problematic behavior and is being removed. This change removes its parser special case, runtime action implementation, and action type registration, then updates workload policy tests so new policies reject set_session_variable as an invalid action. Existing BE-side workload policy actions remain unchanged.
### Release note
The set_session_variable workload policy action is no longer supported.
### Check List (For Author)
- Test:
- Unit Test: ./run-fe-ut.sh --run org.apache.doris.resource.workloadschedpolicy.WorkloadSchedPolicyMgrTest (passed; rerun with elevated permissions after Mockito inline attach failed under sandbox)
- Checkstyle: mvn checkstyle:check -pl fe-core,fe-sql-parser (passed)
- Regression test: ./run-regression-test.sh --run -d workload_manager_p0 -s test_workload_sched_policy (attempted, failed because local 127.0.0.1:9030 Doris cluster was not running)
- Behavior changed: Yes. set_session_variable workload policy action is rejected.
- Does this need documentation: No
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
Please also remove the document from master and 4.x |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
|
run buildall |
TPC-H: Total hot run time: 29248 ms |
TPC-DS: Total hot run time: 171186 ms |
ClickBench: Total hot run time: 25.18 s |
FE UT Coverage ReportIncrement line coverage |
FE Regression Coverage ReportIncrement line coverage |
|
add related PR |
|
PR approved by at least one committer and no changes requested. |
|
/review |
There was a problem hiding this comment.
Automated review summary for PR #64856 at head 4fc1b5e.
I reviewed all changed files and the relevant workload policy parser, validation, replay, publication, FE daemon, regression-test, and BE scheduler paths. I did not add new inline comments in this pass. The only substantiated concern found here is the stale legacy SET_SESSION_VARIABLE metadata behavior, and that is substantially covered by existing discussion r3473644035, which already requested upgrade compatibility handling and clearing the corresponding metadata.
Critical checkpoint conclusions:
- Goal: The PR removes new
set_session_variableworkload policy support: the special parser branch is removed, new action construction rejects it, the runtime action class is deleted, and the FE workload scheduler daemon is no longer started. - Scope: The change is focused on workload policy action removal plus expected test-output updates.
- Concurrency/lifecycle: Removing the FE daemon removes the periodic FE scan path; no new thread, lock ordering, or long-running lock behavior is introduced. Existing policy map locking remains the relevant guard.
- Configuration: No new config is added. The removed FE daemon leaves no dynamic config behavior to validate in this patch.
- Compatibility/persistence:
SET_SESSION_VARIABLEremains in the enum so old JSON can deserialize, andgsonPostProcess()skips runtime action creation. The remaining metadata-clearance concern is duplicate-suppressed against existing discussion r3473644035 rather than repeated here. - FE/BE protocol and parallel paths: BE publication still maps only supported BE actions, and BE-side workload policy condition handling includes
USERNAME, so username-plus-cancel policies can be published to BE. Policies containing the deprecated action are not published becauseACTION_MAPhas no deprecated mapping. - Tests: The regression and FE unit test changes cover new rejection of
set_session_variableand the username-plus-BE-action policy path. I could not run FE/regression tests locally becausethirdparty/installedandthirdparty/installed/bin/protocare missing in this runner, and no Doris cluster is available. - Expected results: The changed
.outfile matches the removal of FEset_session_variablepolicies and replacement of alter-policy coverage withcancel_query. - Observability/performance: No new observability or hot-path work is introduced; the FE periodic scheduler path is removed.
User focus: no additional user-provided review focus was supplied.
Subagent conclusions:
optimizer-rewrite: no optimizer/rewrite, parser semantic-equivalence, join, or aggregate candidates in the initial pass or convergence.tests-session-config: reported TSC-1 for stale legacy metadata after replay; main verification marked itduplicate_of_existing_threadfor r3473644035, so no duplicate inline comment was submitted.- Convergence round 1 ended with both live subagents replying
NO_NEW_VALUABLE_FINDINGSfor the same ledger and empty proposed inline comment set.
What problem does this PR solve?
Related PR: #28443
Problem Summary: The workload policy set_session_variable action has problematic behavior and is being removed. This change removes its
parser special case, runtime action implementation, and action type registration, then updates workload policy tests so new policies reject set_session_variable as an invalid action. Existing BE-side workload policy actions remain unchanged.
Release note
The set_session_variable workload policy action is no longer supported.
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)