Skip to content

[fix](workload) enforce explicit compute group form for workload DDLs#63505

Merged
yiguolei merged 3 commits into
apache:masterfrom
morningman:fix-CIR-20210
May 25, 2026
Merged

[fix](workload) enforce explicit compute group form for workload DDLs#63505
yiguolei merged 3 commits into
apache:masterfrom
morningman:fix-CIR-20210

Conversation

@morningman
Copy link
Copy Markdown
Contributor

@morningman morningman commented May 22, 2026

Cloud mode and non-cloud mode used to share fuzzy fallback behaviour for the
compute-group qualifier on workload DDLs. The fallback misbehaved when the user
omitted the qualifier in cloud mode:

CREATE WORKLOAD POLICY ... 'workload_group'='superset'
-> "Unable to find the compute group: <default_compute_group>"
DROP WORKLOAD GROUP superset
-> "Can not find workload group superset in compute group ."

The literal Tag.VALUE_DEFAULT_COMPUTE_GROUP_NAME was being passed downstream as
if it were a real cluster name.

Enforce a strict contract instead of papering over with a session-derived
fallback:

  • Cloud mode : require '<compute_group>.<workload_group>' for workload
    policy 'workload_group' property, and require FOR/FROM
    clause on CREATE / ALTER / DROP WORKLOAD GROUP.

  • Non-cloud mode: forbid the qualifier on all four; use Tag.VALUE_DEFAULT_TAG
    internally.

Both invalid inputs now surface clear UserException messages that tell the user
how to spell the statement correctly.

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

… (CIR-20210, CIR-20211)

Cloud mode and non-cloud mode used to share fuzzy fallback behaviour for the
compute-group qualifier on workload DDLs. The fallback misbehaved when the user
omitted the qualifier in cloud mode:
  CREATE WORKLOAD POLICY ... 'workload_group'='superset'
    -> "Unable to find the compute group: <default_compute_group>"   (CIR-20210)
  DROP WORKLOAD GROUP superset
    -> "Can not find workload group  superset in compute group ."    (CIR-20211)
The literal Tag.VALUE_DEFAULT_COMPUTE_GROUP_NAME was being passed downstream as
if it were a real cluster name.

Enforce a strict contract instead of papering over with a session-derived
fallback:
  - Cloud mode    : require '<compute_group>.<workload_group>' for workload
                    policy 'workload_group' property, and require FOR/FROM
                    clause on CREATE / ALTER / DROP WORKLOAD GROUP.
  - Non-cloud mode: forbid the qualifier on all four; use Tag.VALUE_DEFAULT_TAG
                    internally.

Both invalid inputs now surface clear UserException messages that tell the user
how to spell the statement correctly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@morningman morningman changed the title [fix](workload-policy) resolve default compute group from session in cloud mode [fix](workload) enforce explicit compute group form for workload DDLs May 22, 2026
morrySnow
morrySnow previously approved these changes May 22, 2026
@morningman
Copy link
Copy Markdown
Contributor Author

run buildall

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label May 22, 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.

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 31013 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit c9b1639d7ef9aae88a6ead6ef157fab5ba95a66f, data reload: false

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17882	3846	3865	3846
q2	q3	10784	1351	810	810
q4	4684	466	347	347
q5	7539	2249	2101	2101
q6	321	180	137	137
q7	942	783	627	627
q8	9343	1762	1651	1651
q9	7071	4912	4961	4912
q10	6488	2108	1794	1794
q11	439	278	240	240
q12	703	436	305	305
q13	18156	3416	2741	2741
q14	260	252	229	229
q15	q16	819	785	707	707
q17	891	902	914	902
q18	6919	5824	5537	5537
q19	1194	1263	1082	1082
q20	539	405	271	271
q21	5890	2552	2468	2468
q22	428	357	306	306
Total cold run time: 101292 ms
Total hot run time: 31013 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4212	4120	4087	4087
q2	q3	4525	4935	4318	4318
q4	2084	2254	1384	1384
q5	4431	4317	4413	4317
q6	262	302	147	147
q7	2054	1857	1627	1627
q8	2425	2164	2133	2133
q9	7815	7714	7688	7688
q10	4527	4547	4091	4091
q11	567	574	394	394
q12	718	738	516	516
q13	3295	3573	2990	2990
q14	298	316	287	287
q15	q16	742	746	658	658
q17	1349	1338	1336	1336
q18	8066	7374	6978	6978
q19	1148	1115	1148	1115
q20	2225	2211	1936	1936
q21	5282	4633	4486	4486
q22	549	460	408	408
Total cold run time: 56574 ms
Total hot run time: 50896 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 168920 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit c9b1639d7ef9aae88a6ead6ef157fab5ba95a66f, data reload: false

query5	4301	654	513	513
query6	334	215	194	194
query7	4257	579	297	297
query8	327	232	220	220
query9	8815	3982	3973	3973
query10	455	354	297	297
query11	5800	2396	2136	2136
query12	175	129	122	122
query13	1294	630	430	430
query14	6007	5327	5077	5077
query14_1	4379	4364	4331	4331
query15	215	206	183	183
query16	993	468	372	372
query17	1143	751	611	611
query18	2479	494	360	360
query19	218	205	192	192
query20	141	133	127	127
query21	212	135	114	114
query22	13702	13505	13426	13426
query23	17188	16348	15953	15953
query23_1	16124	16211	16158	16158
query24	7393	1755	1293	1293
query24_1	1314	1295	1283	1283
query25	521	472	414	414
query26	1312	321	169	169
query27	2698	549	358	358
query28	4512	1929	1933	1929
query29	991	604	494	494
query30	311	237	196	196
query31	1123	1070	963	963
query32	85	74	73	73
query33	547	352	299	299
query34	1161	1165	656	656
query35	765	775	691	691
query36	1357	1379	1256	1256
query37	155	103	91	91
query38	3193	3141	3018	3018
query39	943	917	889	889
query39_1	867	883	910	883
query40	225	144	128	128
query41	68	63	63	63
query42	109	109	109	109
query43	322	327	285	285
query44	
query45	208	195	196	195
query46	1069	1207	745	745
query47	2356	2304	2212	2212
query48	390	413	294	294
query49	636	501	384	384
query50	979	347	235	235
query51	4393	4275	4236	4236
query52	101	102	92	92
query53	239	275	193	193
query54	315	274	255	255
query55	95	94	84	84
query56	298	293	311	293
query57	1413	1387	1301	1301
query58	292	278	270	270
query59	1576	1672	1423	1423
query60	322	321	313	313
query61	156	158	155	155
query62	678	627	572	572
query63	241	204	210	204
query64	2424	842	655	655
query65	
query66	1720	493	356	356
query67	29935	29912	29835	29835
query68	
query69	454	343	302	302
query70	995	945	971	945
query71	312	278	263	263
query72	2946	2754	2397	2397
query73	857	799	447	447
query74	5061	4929	4729	4729
query75	2659	2576	2251	2251
query76	2286	1166	761	761
query77	390	421	331	331
query78	12091	11995	11629	11629
query79	1493	1069	720	720
query80	653	541	458	458
query81	452	284	243	243
query82	1395	161	126	126
query83	354	282	246	246
query84	267	137	112	112
query85	885	553	456	456
query86	380	322	308	308
query87	3394	3461	3230	3230
query88	3604	2688	2662	2662
query89	428	385	334	334
query90	1937	183	179	179
query91	179	167	136	136
query92	79	79	75	75
query93	1492	1431	849	849
query94	530	354	263	263
query95	671	471	351	351
query96	1046	818	343	343
query97	2706	2672	2569	2569
query98	235	224	225	224
query99	1137	1104	979	979
Total cold run time: 252727 ms
Total hot run time: 168920 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 20.69% (12/58) 🎉
Increment coverage report
Complete coverage report

@morningman
Copy link
Copy Markdown
Contributor Author

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review result: request changes. The PR correctly narrows workload-group DDL semantics overall, but I found two correctness/usability issues in the new validation paths that should be fixed before merge.

Critical checkpoint conclusions:

  • Goal and tests: The goal is to require explicit compute-group qualification in cloud mode and forbid it in non-cloud mode. The new tests cover some invalid workload policy property forms, but they miss empty-segment and trailing-dot cases, and the DROP error message currently tells users to use syntax that the parser rejects.
  • Scope: The implementation is small and focused.
  • Concurrency: No new shared mutable state or lock ordering changes were introduced. Existing policy alteration still validates properties while holding the policy write lock, but this PR does not materially change that locking pattern.
  • Lifecycle/static initialization: No special lifecycle or static initialization risk found.
  • Configuration: No new configuration items.
  • Compatibility/persistence: No storage/EditLog format change. Existing persisted policies are not revalidated by this path, so no persistence compatibility issue was found.
  • Parallel paths: CREATE/ALTER/DROP workload group paths were updated, but DROP's cloud-mode error text is inconsistent with the actual grammar.
  • Conditional checks: The new workload_group split checks are directionally correct but incomplete for empty components/trailing dots.
  • Test coverage/results: Tests are unit-level and only cover rejection before Env lookup; no end-to-end DDL regression test is added, and the malformed empty-segment cases are uncovered. I did not run tests in this review.
  • Observability: No new observability needed for these validation-only changes.
  • Transactions/data writes: No transaction or data write correctness issue found.
  • FE/BE variables: No new FE/BE protocol variables.
  • Performance: No meaningful performance concern found.

User focus: No additional user-provided review focus was present.

String originCgStr = computeGroup;
if (StringUtils.isEmpty(computeGroup)) {
computeGroup = Tag.VALUE_DEFAULT_COMPUTE_GROUP_NAME;
throw new UserException("Must specify compute group via 'FROM <compute_group>' "
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parser still accepts DROP WORKLOAD GROUP ... FOR <compute_group> and does not accept FROM here (DorisParser.g4 line 354). If a cloud user omits the clause and follows this error message, the suggested statement will fail to parse. Please either change the grammar to support FROM or make this message say FOR <compute_group> consistently.

Suggested change
throw new UserException("Must specify compute group via 'FROM <compute_group>' "
throw new UserException("Must specify compute group via 'FOR <compute_group>' "


import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This validation still lets malformed values through because String.split("\\.") discards trailing empty segments. For example, in non-cloud mode workload_group='wg.' becomes ['wg'] and is accepted even though the new contract says only <workload_group> with no qualifier is allowed; in cloud mode .wg has length 2 and reaches the compute-group lookup instead of being rejected as an invalid <compute_group>.<workload_group> form. Please preserve empty segments, for example with split("\\.", -1), and reject empty cg/wg components before lookup; add tests for these cases.

… FOR grammar and reject empty dot segments

Two correctness/usability issues raised in the /review run on PR apache#63505:

1. DropWorkloadGroupCommand suggested 'FROM <compute_group>' in cloud mode,
   but the parser (DorisParser.g4 line 354) only accepts FOR for DROP WORKLOAD
   GROUP. Following the suggested text would lead the user to a syntax error.
   Switched both the missing-qualifier and not-supported messages to 'FOR'
   so they match the grammar and the wording in CREATE/ALTER.

2. WorkloadSchedPolicyMgr#checkProperties used split("\\.") which silently
   discards trailing empty segments. Inputs like 'wg.' in non-cloud mode
   collapsed to ["wg"] and slipped past the strict-form check, and '.wg' in
   cloud mode had length 2 and reached the compute-group lookup with an empty
   cg. Switched to split("\\.", -1) and reject empty cg/wg components before
   any Env lookup. Added three regression tests covering trailing-dot and
   leading-dot in both modes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot removed the approved Indicates a PR has been approved by one committer. label May 23, 2026
@morningman
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 31565 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit c764647cf5c88bc567fabd73a752e5004f59d254, data reload: false

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17625	3947	3935	3935
q2	q3	10753	1335	792	792
q4	4695	477	346	346
q5	7522	2274	2126	2126
q6	264	175	145	145
q7	950	808	653	653
q8	9347	1803	1646	1646
q9	6933	4929	4925	4925
q10	6459	2230	1907	1907
q11	438	283	243	243
q12	697	421	291	291
q13	18229	3294	2758	2758
q14	267	261	240	240
q15	q16	815	770	708	708
q17	949	965	969	965
q18	6932	5678	5464	5464
q19	1170	1327	1206	1206
q20	538	451	282	282
q21	6042	2687	2601	2601
q22	450	370	332	332
Total cold run time: 101075 ms
Total hot run time: 31565 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4771	4731	4881	4731
q2	q3	4934	5266	4731	4731
q4	2135	2229	1448	1448
q5	4952	4788	4666	4666
q6	236	182	129	129
q7	1825	1824	1555	1555
q8	2426	1975	1936	1936
q9	7341	7461	7366	7366
q10	4766	4679	4265	4265
q11	534	391	361	361
q12	759	755	551	551
q13	3047	3411	2831	2831
q14	274	294	252	252
q15	q16	677	706	604	604
q17	1296	1277	1264	1264
q18	7364	6996	6728	6728
q19	1093	1130	1091	1091
q20	2227	2229	1964	1964
q21	5395	4614	4490	4490
q22	518	462	415	415
Total cold run time: 56570 ms
Total hot run time: 51378 ms

@morningman
Copy link
Copy Markdown
Contributor Author

/review

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 172847 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit c764647cf5c88bc567fabd73a752e5004f59d254, data reload: false

query5	4347	670	502	502
query6	342	220	196	196
query7	4245	536	312	312
query8	323	231	220	220
query9	8812	4169	4150	4150
query10	453	357	312	312
query11	5804	2653	2198	2198
query12	184	131	129	129
query13	1301	577	412	412
query14	6116	5496	5207	5207
query14_1	4496	4529	4497	4497
query15	207	200	188	188
query16	1006	450	398	398
query17	1112	720	600	600
query18	2493	482	358	358
query19	213	206	159	159
query20	133	134	127	127
query21	224	145	120	120
query22	13677	13588	13357	13357
query23	17440	16589	16261	16261
query23_1	16513	16427	16420	16420
query24	7443	1808	1341	1341
query24_1	1336	1322	1344	1322
query25	572	512	442	442
query26	1309	316	173	173
query27	2708	567	354	354
query28	4474	2046	2053	2046
query29	1012	642	521	521
query30	309	241	199	199
query31	1143	1085	968	968
query32	92	86	73	73
query33	562	375	301	301
query34	1186	1165	661	661
query35	807	808	683	683
query36	1413	1425	1323	1323
query37	148	105	93	93
query38	3223	3172	3088	3088
query39	933	920	916	916
query39_1	885	898	892	892
query40	240	150	133	133
query41	72	69	70	69
query42	130	112	109	109
query43	334	332	294	294
query44	
query45	212	200	201	200
query46	1100	1173	747	747
query47	2357	2353	2269	2269
query48	423	415	293	293
query49	631	492	368	368
query50	976	341	252	252
query51	4573	4373	4378	4373
query52	105	106	95	95
query53	273	280	202	202
query54	321	279	256	256
query55	96	94	88	88
query56	302	297	301	297
query57	1490	1501	1387	1387
query58	298	272	267	267
query59	1636	1760	1404	1404
query60	315	319	314	314
query61	157	161	153	153
query62	698	651	585	585
query63	241	209	202	202
query64	2408	854	639	639
query65	
query66	1759	480	366	366
query67	29523	30186	29956	29956
query68	
query69	485	354	301	301
query70	1091	987	956	956
query71	308	271	262	262
query72	2902	2717	2350	2350
query73	867	721	444	444
query74	5143	4957	4788	4788
query75	2695	2627	2273	2273
query76	2316	1175	785	785
query77	414	418	341	341
query78	12415	12346	11823	11823
query79	1475	1070	784	784
query80	635	538	453	453
query81	452	284	242	242
query82	1385	155	124	124
query83	362	276	252	252
query84	256	144	113	113
query85	900	538	447	447
query86	402	334	334	334
query87	3408	3386	3266	3266
query88	3657	2777	2738	2738
query89	439	384	341	341
query90	1944	183	188	183
query91	210	174	136	136
query92	78	75	73	73
query93	1493	1417	842	842
query94	566	370	314	314
query95	677	384	431	384
query96	1059	780	317	317
query97	2783	2756	2589	2589
query98	233	229	233	229
query99	1171	1142	1036	1036
Total cold run time: 254760 ms
Total hot run time: 172847 ms

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review result: no additional blocking issues found.\n\nCritical checkpoint conclusions:\n- Goal and proof: The PR enforces explicit compute-group qualification for workload group DDLs/policy binding in cloud mode and rejects qualifiers in non-cloud mode. The added WorkloadSchedPolicyMgr tests cover invalid policy property formats, including the previously raised dot-segment cases.\n- Scope/focus: The changes are focused on workload group command validation and workload policy property validation.\n- Concurrency/lifecycle: No new shared mutable state, threads, locks, or non-trivial lifecycle management introduced.\n- Config/compatibility: No new config items or storage/protocol formats. This is a deliberate user-visible validation change.\n- Parallel paths: CREATE, ALTER, DROP workload group and workload policy property validation are all updated consistently for cloud/non-cloud behavior. Existing review context for DROP grammar wording and split trailing-empty handling is resolved in the current head.\n- Error handling: UserException/AnalysisException usage follows the existing FE command patterns; user-facing messages identify the expected form.\n- Tests: Unit coverage was added for workload policy property validation, including the existing review-thread cases. I did not run tests in this automated review pass.\n- Observability/performance/persistence/data correctness: No new observability needs identified; no hot-path performance, EditLog, transaction, or visible-version concerns found.\n\nUser focus: No additional user-provided review focus was specified.

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 17.86% (5/28) 🎉
Increment coverage report
Complete coverage report

} else {
if (StringUtils.isEmpty(computeGroup)) {
computeGroup = Tag.DEFAULT_BACKEND_TAG.value;
if (!StringUtils.isEmpty(computeGroup)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个修复不对
我们再非cloud mode 下,也是支持for 来指定的。
只是不指定的时候,默认就是Tag.DEFAULT_BACKEND_TAG.value;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

…ce group

Per PR apache#63505 review: in non-cloud mode the FOR <compute_group> clause is also
supported syntactically — the value refers to a resource group (Tag), with
Tag.VALUE_DEFAULT_TAG as the default when omitted. The grammar is shared with
cloud mode purely for consistency. Added comments at each site explaining the
duality.

Also extends the workload_group property in WorkloadSchedPolicyMgr to accept
the '<resource_group>.<workload_group>' form in non-cloud mode, while still
rejecting empty segments and over-qualified inputs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@morningman
Copy link
Copy Markdown
Contributor Author

run buildall

@morningman
Copy link
Copy Markdown
Contributor Author

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed PR #63505 at 966e2d2.

No blocking correctness issues found in the current diff. The previous review concerns are addressed in the current head: DROP workload group messages now match the FOR grammar, workload_group parsing preserves trailing empty dot segments and rejects empty components, and non-cloud FOR is now treated as a resource group/tag instead of being rejected.

Critical checkpoint conclusions:

  • Goal/test evidence: The change enforces explicit cloud workload-group qualification and preserves non-cloud resource-group behavior. Added unit tests cover malformed workload_group property forms; positive Env-backed cloud/non-cloud lookups are not covered.
  • Scope/focus: The changes are limited to workload group DDL resolution, workload policy property validation, and focused tests.
  • Concurrency/lifecycle: No new shared mutable state or lifecycle-sensitive objects were introduced beyond temporary ConnectContext construction for validation.
  • Configuration/compatibility: No new config or storage/protocol format changes. Existing policy persistence stores workload group IDs, so no new replay path was identified.
  • Parallel paths: CREATE/ALTER/DROP workload group and workload policy property validation were reviewed together for cloud/non-cloud behavior.
  • Error handling: Invalid/missing cloud compute group forms now raise UserException before fallback to default names; dot-format errors are rejected before lookup.
  • Test coverage: Targeted tests cover invalid format paths. I attempted ./run-fe-ut.sh --run org.apache.doris.resource.workloadschedpolicy.WorkloadSchedPolicyMgrTest, but it could not proceed because thirdparty/installed/bin/protoc is missing in the runner.
  • Observability/performance: No new hot-path or observability concerns found; this remains validation/control-plane logic.

User focus: No additional user-provided review focus was specified.

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 31932 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 966e2d2ffef679f1de8005f6c5dcd8b063769922, data reload: false

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17954	4312	4094	4094
q2	q3	10755	1495	836	836
q4	4686	478	344	344
q5	7582	2220	2146	2146
q6	290	176	140	140
q7	946	781	636	636
q8	9536	1709	1723	1709
q9	7012	4985	5005	4985
q10	6461	2240	1902	1902
q11	439	272	254	254
q12	690	436	299	299
q13	18191	3393	2823	2823
q14	282	269	247	247
q15	q16	833	785	724	724
q17	924	902	1027	902
q18	6924	5738	5555	5555
q19	1251	1366	1075	1075
q20	571	418	271	271
q21	6013	2832	2655	2655
q22	472	387	335	335
Total cold run time: 101812 ms
Total hot run time: 31932 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	5134	5139	5006	5006
q2	q3	4831	5279	4686	4686
q4	2173	2257	1464	1464
q5	5016	4794	4792	4792
q6	237	172	128	128
q7	1869	1785	1597	1597
q8	2414	1975	1978	1975
q9	7502	7563	7529	7529
q10	4790	4708	4234	4234
q11	554	390	386	386
q12	739	745	544	544
q13	3150	3368	2841	2841
q14	283	279	267	267
q15	q16	686	706	636	636
q17	1403	1370	1359	1359
q18	7440	6858	7082	6858
q19	1149	1094	1123	1094
q20	2227	2240	1976	1976
q21	5406	4753	4599	4599
q22	542	480	411	411
Total cold run time: 57545 ms
Total hot run time: 52382 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 172816 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 966e2d2ffef679f1de8005f6c5dcd8b063769922, data reload: false

query5	4323	664	515	515
query6	351	228	213	213
query7	4238	557	308	308
query8	321	235	224	224
query9	8814	4115	4110	4110
query10	436	345	301	301
query11	5787	2561	2279	2279
query12	181	126	128	126
query13	1267	617	447	447
query14	6185	5571	5253	5253
query14_1	4572	4574	4567	4567
query15	217	208	186	186
query16	997	469	466	466
query17	1112	732	583	583
query18	2743	498	359	359
query19	299	201	156	156
query20	162	129	133	129
query21	216	137	126	126
query22	13950	13628	13617	13617
query23	17437	16738	16289	16289
query23_1	16417	16281	16482	16281
query24	7453	1785	1309	1309
query24_1	1315	1323	1336	1323
query25	557	482	472	472
query26	1302	317	171	171
query27	2695	538	346	346
query28	4402	2016	2027	2016
query29	966	612	505	505
query30	304	240	195	195
query31	1128	1079	957	957
query32	92	79	75	75
query33	546	339	310	310
query34	1191	1145	667	667
query35	771	791	692	692
query36	1450	1438	1264	1264
query37	151	104	93	93
query38	3219	3177	3072	3072
query39	929	926	911	911
query39_1	888	865	874	865
query40	225	143	122	122
query41	66	63	64	63
query42	110	104	110	104
query43	331	331	304	304
query44	
query45	223	202	198	198
query46	1083	1168	723	723
query47	2393	2377	2260	2260
query48	404	408	309	309
query49	632	510	382	382
query50	1064	352	247	247
query51	4300	4286	4342	4286
query52	107	102	94	94
query53	256	280	204	204
query54	316	280	259	259
query55	94	92	84	84
query56	292	325	308	308
query57	1447	1436	1365	1365
query58	303	273	270	270
query59	1606	1657	1474	1474
query60	314	319	297	297
query61	163	162	159	159
query62	705	653	594	594
query63	244	198	207	198
query64	2209	809	660	660
query65	
query66	1648	475	363	363
query67	30025	30047	29945	29945
query68	
query69	463	349	307	307
query70	1020	1031	980	980
query71	295	272	267	267
query72	2993	2711	2514	2514
query73	881	748	422	422
query74	5119	4955	4806	4806
query75	2682	2609	2271	2271
query76	2291	1163	783	783
query77	407	414	353	353
query78	12421	12358	11919	11919
query79	1460	1040	764	764
query80	677	557	487	487
query81	454	286	245	245
query82	1418	158	121	121
query83	373	295	262	262
query84	279	147	119	119
query85	961	667	538	538
query86	387	348	318	318
query87	3449	3367	3272	3272
query88	3625	2773	2774	2773
query89	450	396	349	349
query90	1861	197	189	189
query91	194	184	158	158
query92	83	84	74	74
query93	1472	1428	849	849
query94	567	376	330	330
query95	699	389	473	389
query96	1121	792	336	336
query97	2748	2765	2612	2612
query98	234	230	232	230
query99	1178	1153	1039	1039
Total cold run time: 255141 ms
Total hot run time: 172816 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 36.36% (12/33) 🎉
Increment coverage report
Complete coverage report

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label May 25, 2026
@github-actions
Copy link
Copy Markdown
Contributor

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

@yiguolei yiguolei merged commit 942734e into apache:master May 25, 2026
33 of 34 checks passed
github-actions Bot pushed a commit that referenced this pull request May 25, 2026
…#63505)

Cloud mode and non-cloud mode used to share fuzzy fallback behaviour for
the
compute-group qualifier on workload DDLs. The fallback misbehaved when
the user
omitted the qualifier in cloud mode:

  CREATE WORKLOAD POLICY ... 'workload_group'='superset'
    -> "Unable to find the compute group: <default_compute_group>" 
  DROP WORKLOAD GROUP superset
    -> "Can not find workload group  superset in compute group ."

The literal Tag.VALUE_DEFAULT_COMPUTE_GROUP_NAME was being passed
downstream as
if it were a real cluster name.

Enforce a strict contract instead of papering over with a
session-derived
fallback:

- Cloud mode : require '<compute_group>.<workload_group>' for workload
policy 'workload_group' property, and require FOR/FROM
                    clause on CREATE / ALTER / DROP WORKLOAD GROUP.

- Non-cloud mode: forbid the qualifier on all four; use
Tag.VALUE_DEFAULT_TAG
                    internally.

Both invalid inputs now surface clear UserException messages that tell
the user
how to spell the statement correctly.

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 17.65% (12/68) 🎉
Increment coverage report
Complete coverage report

yiguolei pushed a commit to apache/doris-website that referenced this pull request May 25, 2026
…oad DDLs (#3763)

## Summary

Documents the contract change introduced by apache/doris#63505,
cross-checked against the actual Java code and `DorisParser.g4` grammar
(not just the PR description):

- **Cloud mode (storage-compute decoupled)**:
- `CREATE / ALTER / DROP WORKLOAD GROUP` must explicitly carry the `FOR
<compute_group>` clause; omitting it now raises `Must specify compute
group via 'FOR <compute_group>' in cloud mode.`
- The `workload_group` property of `CREATE / ALTER WORKLOAD POLICY` must
use the fully qualified `<compute_group>.<workload_group>` form; bare
names, extra dots, and empty segments are rejected.
- **Non-cloud mode (storage-compute coupled)**:
- The `FOR` clause is optional; the value is a resource group (Tag),
with the grammar shared with cloud mode for consistency. Omitting it
falls back to `Tag.VALUE_DEFAULT_TAG`.
- The `workload_group` property accepts either `<workload_group>` or
`<resource_group>.<workload_group>`.

## Files updated (8 files × 4 locations = 32)

EN current + EN version-4.x + ZH current + ZH version-4.x of:

- `sql-manual/.../CREATE-WORKLOAD-GROUP.md`
- `sql-manual/.../ALTER-WORKLOAD-GROUP.md`
- `sql-manual/.../DROP-WORKLOAD-GROUP.md`
- `sql-manual/.../CREATE-WORKLOAD-POLICY.md` (the EN file was a stale
copy of CREATE WORKLOAD GROUP content; rewritten to the correct policy
structure as part of this change)
- `sql-manual/.../ALTER-WORKLOAD-POLICY.md`
-
`admin-manual/workload-management/workload-group-bind-compute-group.md`
- `admin-manual/workload-management/workload-group.md`
- `admin-manual/workload-management/sql-blocking.md`

## Test plan

- [ ] Render the updated pages locally and verify the new caution / note
blocks render correctly.
- [ ] Verify internal cross-links (no `.md` / `.mdx` extensions)
resolve.
- [ ] Verify EN current and EN version-4.x stay byte-identical for these
8 files.
- [ ] Verify ZH current and ZH version-4.x stay byte-identical for these
8 files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
yiguolei pushed a commit that referenced this pull request May 25, 2026
…orkload DDLs #63505 (#63596)

Cherry-picked from #63505

Co-authored-by: Mingyu Chen (Rayner) <yunyou@selectdb.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants