Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improvement](executor)Add tag property for workload group #32874

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

wangbo
Copy link
Contributor

@wangbo wangbo commented Mar 27, 2024

Proposed changes

Add tag property for workload group, the workload groups within same tag 's hard limit sum value can not exceeds 100%.
User can group workload group by Resource tag.

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@wangbo
Copy link
Contributor Author

wangbo commented Mar 27, 2024

run buildall

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.26% (8739/24786)
Line Coverage: 27.04% (71538/264612)
Region Coverage: 26.28% (37117/141249)
Branch Coverage: 23.18% (18980/81894)
Coverage Report: http://coverage.selectdb-in.cc/coverage/de59359b37269af169785ca8759ec6e16a8937f1_de59359b37269af169785ca8759ec6e16a8937f1/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17661	5105	4162	4162
q2	2115	154	152	152
q3	10661	1124	1208	1124
q4	10237	806	779	779
q5	7464	2989	2984	2984
q6	207	124	120	120
q7	1033	575	584	575
q8	9339	1993	1981	1981
q9	7239	6610	6560	6560
q10	8440	3489	3557	3489
q11	429	226	214	214
q12	399	202	194	194
q13	17791	2846	2848	2846
q14	231	205	213	205
q15	529	465	460	460
q16	491	373	381	373
q17	955	607	556	556
q18	7153	6398	6349	6349
q19	3083	1424	1405	1405
q20	542	248	268	248
q21	3592	2835	2964	2835
q22	355	295	329	295
Total cold run time: 109946 ms
Total hot run time: 37906 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4176	4098	4074	4074
q2	330	231	230	230
q3	2936	2882	2802	2802
q4	1851	1590	1542	1542
q5	5301	5326	5329	5326
q6	198	117	119	117
q7	2247	1874	1834	1834
q8	3159	3286	3302	3286
q9	8798	8704	8701	8701
q10	3818	3828	3819	3819
q11	549	459	447	447
q12	739	579	541	541
q13	16939	2863	2893	2863
q14	277	248	251	248
q15	510	464	468	464
q16	477	420	424	420
q17	1732	1506	1477	1477
q18	7377	7112	7102	7102
q19	1658	1584	1545	1545
q20	1906	1731	1691	1691
q21	4880	4720	4684	4684
q22	524	456	463	456
Total cold run time: 70382 ms
Total hot run time: 53669 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 181605 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 de59359b37269af169785ca8759ec6e16a8937f1, data reload: false

query1	944	366	351	351
query2	6534	1800	1947	1800
query3	6706	220	230	220
query4	31568	21252	21378	21252
query5	4306	398	407	398
query6	282	183	172	172
query7	4627	308	297	297
query8	243	166	176	166
query9	9086	2269	2256	2256
query10	563	244	259	244
query11	17081	14200	14194	14194
query12	140	87	80	80
query13	1626	421	416	416
query14	9632	7977	7666	7666
query15	244	205	208	205
query16	8176	280	265	265
query17	1947	573	557	557
query18	2106	292	289	289
query19	335	153	163	153
query20	95	91	89	89
query21	202	136	133	133
query22	4954	4806	4758	4758
query23	33690	32972	32816	32816
query24	11024	2900	2892	2892
query25	622	391	388	388
query26	1390	165	163	163
query27	2983	358	361	358
query28	7431	1902	1885	1885
query29	876	639	632	632
query30	306	164	150	150
query31	976	732	723	723
query32	86	57	58	57
query33	770	261	259	259
query34	1000	480	504	480
query35	819	597	606	597
query36	1022	841	861	841
query37	122	66	67	66
query38	3553	3499	3428	3428
query39	1470	1475	1432	1432
query40	215	111	111	111
query41	50	51	44	44
query42	102	96	95	95
query43	494	452	461	452
query44	1119	750	725	725
query45	282	265	265	265
query46	1107	714	702	702
query47	1923	1844	1856	1844
query48	448	348	363	348
query49	1137	328	331	328
query50	757	365	377	365
query51	6805	6559	6499	6499
query52	105	88	91	88
query53	341	274	278	274
query54	290	230	237	230
query55	85	80	82	80
query56	240	222	217	217
query57	1193	1144	1131	1131
query58	255	205	207	205
query59	2786	2713	2651	2651
query60	276	244	243	243
query61	97	97	93	93
query62	653	459	478	459
query63	304	279	280	279
query64	5816	3699	3917	3699
query65	3049	3008	2993	2993
query66	889	375	362	362
query67	15134	15017	15194	15017
query68	5341	534	531	531
query69	576	383	392	383
query70	1231	1143	1186	1143
query71	437	267	263	263
query72	6407	2845	2700	2700
query73	706	323	332	323
query74	7848	6358	6428	6358
query75	3015	2180	2210	2180
query76	3543	867	893	867
query77	418	273	273	273
query78	10974	10124	10160	10124
query79	8146	552	547	547
query80	2151	407	410	407
query81	555	220	221	220
query82	1312	91	89	89
query83	317	157	156	156
query84	300	85	83	83
query85	1975	326	309	309
query86	498	268	293	268
query87	3664	3552	3563	3552
query88	5120	2390	2367	2367
query89	492	368	371	368
query90	2008	179	177	177
query91	169	138	135	135
query92	66	50	51	50
query93	5851	517	499	499
query94	1237	179	179	179
query95	428	331	323	323
query96	610	279	268	268
query97	2691	2438	2457	2438
query98	236	216	201	201
query99	1217	937	897	897
Total cold run time: 305028 ms
Total hot run time: 181605 ms

@doris-robot
Copy link

Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'

Load test result on commit de59359b37269af169785ca8759ec6e16a8937f1 with default session variables
Stream load json:         18 seconds loaded 2358488459 Bytes, about 124 MB/s
Stream load orc:          59 seconds loaded 1101869774 Bytes, about 17 MB/s
Stream load parquet:      32 seconds loaded 861443392 Bytes, about 25 MB/s
Insert into select:       13.8 seconds inserted 10000000 Rows, about 724K ops/s

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

12 similar comments
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@wangbo
Copy link
Contributor Author

wangbo commented Mar 27, 2024

run buildall

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17613	4285	4113	4113
q2	2109	169	160	160
q3	10792	1173	1223	1173
q4	10237	805	835	805
q5	7448	3032	2969	2969
q6	207	126	123	123
q7	1066	595	587	587
q8	9355	2015	1981	1981
q9	7194	6636	6625	6625
q10	8421	3416	3555	3416
q11	432	225	223	223
q12	374	211	195	195
q13	17799	2846	2865	2846
q14	221	206	197	197
q15	537	458	465	458
q16	467	378	378	378
q17	944	539	608	539
q18	7230	6547	6406	6406
q19	1567	1469	1488	1469
q20	549	275	248	248
q21	3598	2995	2879	2879
q22	343	298	312	298
Total cold run time: 108503 ms
Total hot run time: 38088 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4075	4078	4053	4053
q2	325	229	231	229
q3	2989	2806	2821	2806
q4	1811	1543	1518	1518
q5	5311	5334	5346	5334
q6	197	116	117	116
q7	2230	1861	1879	1861
q8	3147	3289	3285	3285
q9	8683	8691	8678	8678
q10	3778	3747	3735	3735
q11	538	439	459	439
q12	755	529	590	529
q13	16916	2873	2856	2856
q14	279	244	249	244
q15	501	454	461	454
q16	477	420	430	420
q17	1735	1473	1450	1450
q18	7379	7065	7188	7065
q19	1580	1500	1516	1500
q20	1891	1740	1713	1713
q21	4894	4648	4752	4648
q22	536	462	437	437
Total cold run time: 70027 ms
Total hot run time: 53370 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.25% (8741/24796)
Line Coverage: 27.03% (71542/264670)
Region Coverage: 26.27% (37121/141288)
Branch Coverage: 23.17% (18980/81916)
Coverage Report: http://coverage.selectdb-in.cc/coverage/80a1e71c4ece7e4f678a70dcf24b8f24ea5933dc_80a1e71c4ece7e4f678a70dcf24b8f24ea5933dc/report/index.html

@doris-robot
Copy link

TPC-DS: Total hot run time: 181588 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 80a1e71c4ece7e4f678a70dcf24b8f24ea5933dc, data reload: false

query1	920	372	362	362
query2	6539	1950	1873	1873
query3	6700	211	213	211
query4	31691	21334	21376	21334
query5	4314	413	398	398
query6	274	175	172	172
query7	4628	301	294	294
query8	227	173	178	173
query9	9376	2316	2323	2316
query10	569	245	249	245
query11	17139	14183	14257	14183
query12	141	88	92	88
query13	1616	412	405	405
query14	10104	7525	8026	7525
query15	277	207	199	199
query16	8172	260	267	260
query17	1938	581	563	563
query18	2105	296	285	285
query19	336	153	156	153
query20	101	86	89	86
query21	199	131	126	126
query22	4991	4823	4821	4821
query23	33497	32772	32744	32744
query24	10795	2881	2869	2869
query25	623	389	398	389
query26	1577	157	157	157
query27	2971	356	349	349
query28	7666	1898	1895	1895
query29	958	649	614	614
query30	297	151	150	150
query31	981	720	754	720
query32	91	59	59	59
query33	773	248	245	245
query34	1060	483	519	483
query35	817	619	612	612
query36	1008	897	886	886
query37	123	70	66	66
query38	3557	3394	3422	3394
query39	1490	1463	1445	1445
query40	291	115	116	115
query41	49	51	48	48
query42	103	98	99	98
query43	474	446	434	434
query44	1170	729	729	729
query45	284	260	264	260
query46	1122	702	695	695
query47	1939	1887	1875	1875
query48	454	349	356	349
query49	1212	338	321	321
query50	747	362	366	362
query51	6679	6662	6691	6662
query52	105	87	90	87
query53	340	273	267	267
query54	320	232	257	232
query55	90	84	80	80
query56	235	212	214	212
query57	1217	1161	1134	1134
query58	228	201	208	201
query59	2921	2800	2470	2470
query60	264	240	243	240
query61	96	97	96	96
query62	657	453	439	439
query63	301	273	274	273
query64	6443	3995	4064	3995
query65	3119	3030	3047	3030
query66	1422	375	347	347
query67	15330	14894	15042	14894
query68	5257	514	531	514
query69	556	371	376	371
query70	1210	1188	1154	1154
query71	403	266	267	266
query72	6248	2737	2681	2681
query73	708	314	326	314
query74	7556	6477	6418	6418
query75	2982	2262	2207	2207
query76	3542	837	857	837
query77	397	275	258	258
query78	10866	10088	10111	10088
query79	7958	523	555	523
query80	1764	394	397	394
query81	549	217	216	216
query82	1391	91	86	86
query83	285	155	145	145
query84	289	86	79	79
query85	2217	390	343	343
query86	505	288	300	288
query87	3677	3511	3507	3507
query88	5077	2297	2312	2297
query89	478	378	370	370
query90	2008	179	174	174
query91	170	144	139	139
query92	65	46	46	46
query93	5688	493	484	484
query94	1252	177	175	175
query95	431	332	323	323
query96	596	264	272	264
query97	2677	2485	2441	2441
query98	236	216	206	206
query99	1196	886	905	886
Total cold run time: 306487 ms
Total hot run time: 181588 ms

@doris-robot
Copy link

Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'

Load test result on commit 80a1e71c4ece7e4f678a70dcf24b8f24ea5933dc with default session variables
Stream load json:         19 seconds loaded 2358488459 Bytes, about 118 MB/s
Stream load orc:          58 seconds loaded 1101869774 Bytes, about 18 MB/s
Stream load parquet:      31 seconds loaded 861443392 Bytes, about 26 MB/s
Insert into select:       13.9 seconds inserted 10000000 Rows, about 719K ops/s

@@ -71,14 +71,18 @@ public class WorkloadGroup implements Writable, GsonPostProcessable {

public static final String SPILL_THRESHOLD_HIGH_WATERMARK = "spill_threshold_high_watermark";

public static final String TAG = "tag";
public static final String TAG_DEFAULT_VALUE = "default_tag";
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not use this logic to manage workload group without tag.
If a workload's tag is empty, then it is on all be.

@@ -69,6 +72,15 @@ public void analyze(Analyzer analyzer) throws UserException {
if (properties == null || properties.isEmpty()) {
throw new AnalysisException("Resource group properties can't be null");
}

String wgTag = properties.get(WorkloadGroup.TAG);
if (!StringUtils.isEmpty(wgTag)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

the tag value should be trimed.
And do not use default_tag for workload group without tag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tag name is checked in CreateWorkloadGroupStmt using FeNameFormat.checkCommonName

@@ -142,6 +146,9 @@ private WorkloadGroup(long id, String name, Map<String, String> properties, long
}
this.properties.put(SPILL_THRESHOLD_HIGH_WATERMARK, highWatermarkStr);
}
if (properties.containsKey(TAG)) {
this.properties.put(TAG, properties.get(TAG).toLowerCase());
Copy link
Contributor

Choose a reason for hiding this comment

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

trim the tag value

} else if (TAG.equals(key)) {
String val = properties.get(key);
if (StringUtils.isEmpty(val)) {
row.add(TAG_DEFAULT_VALUE);
Copy link
Contributor

Choose a reason for hiding this comment

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

just leave it empty

@@ -431,10 +431,11 @@ private static TFetchSchemaTableDataResult workloadGroupsMetadataResult(TSchemaT
trow.addToColumnValue(new TCell().setLongVal(Long.valueOf(rGroupsInfo.get(10))));
// min remote scan thread num
trow.addToColumnValue(new TCell().setLongVal(Long.valueOf(rGroupsInfo.get(11))));
Copy link
Contributor

Choose a reason for hiding this comment

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

We miss some logic?
When publish topic to BE, we should use tag to match the Backends?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can consider it when support multi process.

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@wangbo
Copy link
Contributor Author

wangbo commented Mar 28, 2024

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17579	4202	4098	4098
q2	2106	159	148	148
q3	10581	1085	1165	1085
q4	10235	763	797	763
q5	7466	3034	2948	2948
q6	199	122	123	122
q7	1006	573	569	569
q8	9334	1909	1968	1909
q9	7281	6579	6537	6537
q10	8398	3504	3567	3504
q11	439	223	221	221
q12	437	205	195	195
q13	17802	2819	2846	2819
q14	241	205	198	198
q15	514	455	463	455
q16	504	377	375	375
q17	932	550	554	550
q18	7057	6472	6499	6472
q19	2826	1478	1382	1382
q20	548	253	262	253
q21	3516	3022	2922	2922
q22	358	314	304	304
Total cold run time: 109359 ms
Total hot run time: 37829 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4201	4070	4059	4059
q2	327	226	234	226
q3	2973	2807	2832	2807
q4	1841	1547	1525	1525
q5	5299	5306	5294	5294
q6	195	119	119	119
q7	2233	1838	1891	1838
q8	3173	3306	3295	3295
q9	8664	8648	8695	8648
q10	3789	3817	3738	3738
q11	553	446	447	446
q12	732	534	505	505
q13	16928	2871	2851	2851
q14	279	243	256	243
q15	493	458	461	458
q16	473	426	426	426
q17	1728	1498	1464	1464
q18	7468	7142	7058	7058
q19	1628	1531	1499	1499
q20	1957	1723	1729	1723
q21	4744	4550	4735	4550
q22	567	460	464	460
Total cold run time: 70245 ms
Total hot run time: 53232 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.62% (8832/24797)
Line Coverage: 27.33% (72366/264819)
Region Coverage: 26.55% (37534/141352)
Branch Coverage: 23.36% (19142/81948)
Coverage Report: http://coverage.selectdb-in.cc/coverage/276d35ead2c561a67034e1280530cfaaec96b795_276d35ead2c561a67034e1280530cfaaec96b795/report/index.html

@doris-robot
Copy link

TPC-DS: Total hot run time: 181491 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 276d35ead2c561a67034e1280530cfaaec96b795, data reload: false

query1	927	375	348	348
query2	6526	2108	1983	1983
query3	6711	210	220	210
query4	31732	21348	21274	21274
query5	4307	413	400	400
query6	272	176	184	176
query7	4621	291	290	290
query8	234	171	172	171
query9	9287	2339	2307	2307
query10	573	246	275	246
query11	15472	14229	14249	14229
query12	136	88	87	87
query13	1615	405	400	400
query14	9739	7949	7660	7660
query15	239	199	209	199
query16	8139	268	265	265
query17	1947	576	555	555
query18	2086	292	295	292
query19	263	167	159	159
query20	95	89	87	87
query21	205	135	132	132
query22	4919	4834	4808	4808
query23	33421	32643	32565	32565
query24	11106	2782	2834	2782
query25	642	390	401	390
query26	1173	161	164	161
query27	3034	346	350	346
query28	7696	1876	1876	1876
query29	911	621	605	605
query30	307	150	147	147
query31	963	721	744	721
query32	87	54	57	54
query33	757	247	253	247
query34	1035	511	486	486
query35	834	619	635	619
query36	1010	896	882	882
query37	110	63	61	61
query38	3579	3419	3439	3419
query39	1478	1437	1420	1420
query40	210	116	116	116
query41	50	45	46	45
query42	105	96	94	94
query43	503	448	435	435
query44	1180	738	742	738
query45	272	252	259	252
query46	1109	712	705	705
query47	1911	1822	1828	1822
query48	448	361	344	344
query49	1127	338	337	337
query50	761	374	382	374
query51	6722	6624	6710	6624
query52	107	88	91	88
query53	343	279	277	277
query54	290	240	226	226
query55	82	81	90	81
query56	245	221	219	219
query57	1197	1118	1125	1118
query58	251	204	210	204
query59	2762	2486	2534	2486
query60	261	246	251	246
query61	95	94	110	94
query62	652	453	438	438
query63	302	277	277	277
query64	5767	4135	4144	4135
query65	3102	3020	3072	3020
query66	951	405	374	374
query67	15328	15392	14766	14766
query68	6902	538	538	538
query69	623	409	389	389
query70	1232	1137	1126	1126
query71	446	268	274	268
query72	6861	2933	2712	2712
query73	724	319	323	319
query74	7810	6444	6277	6277
query75	3320	2194	2225	2194
query76	4269	906	912	906
query77	630	269	272	269
query78	11000	10309	10088	10088
query79	8439	531	520	520
query80	1498	388	372	372
query81	546	217	216	216
query82	841	90	84	84
query83	194	150	141	141
query84	301	78	77	77
query85	1497	343	324	324
query86	466	294	308	294
query87	3713	3530	3546	3530
query88	5144	2305	2288	2288
query89	529	367	372	367
query90	1892	180	195	180
query91	173	142	138	138
query92	60	47	50	47
query93	7204	502	496	496
query94	1150	177	175	175
query95	433	342	334	334
query96	612	275	268	268
query97	2673	2487	2459	2459
query98	237	220	205	205
query99	1195	896	917	896
Total cold run time: 306935 ms
Total hot run time: 181491 ms

@doris-robot
Copy link

Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'

Load test result on commit 276d35ead2c561a67034e1280530cfaaec96b795 with default session variables
Stream load json:         18 seconds loaded 2358488459 Bytes, about 124 MB/s
Stream load orc:          59 seconds loaded 1101869774 Bytes, about 17 MB/s
Stream load parquet:      31 seconds loaded 861443392 Bytes, about 26 MB/s
Insert into select:       13.6 seconds inserted 10000000 Rows, about 735K ops/s

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Mar 28, 2024
Copy link
Contributor

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

Copy link
Contributor

PR approved by anyone and no changes requested.

Copy link
Member

@mrhhsg mrhhsg left a comment

Choose a reason for hiding this comment

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

LGTM

@yiguolei yiguolei merged commit bf381b6 into apache:master Mar 28, 2024
26 of 30 checks passed
Jibing-Li added a commit that referenced this pull request Mar 29, 2024
* [fix](merge cloud) Fix cloud be set be tag map (#32864)

* [chore] Add gavinchou to collaborators (#32881)

* [chore](show) support statement to show views from table (#32358)

MySQL [test]> show views;
+----------------+
| Tables_in_test |
+----------------+
| t1_view        |
| t2_view        |
+----------------+
2 rows in set (0.00 sec)

MySQL [test]> show views like '%t1%';
+----------------+
| Tables_in_test |
+----------------+
| t1_view        |
+----------------+
1 row in set (0.01 sec)

MySQL [test]> show views where create_time > '2024-03-18';
+----------------+
| Tables_in_test |
+----------------+
| t2_view        |
+----------------+
1 row in set (0.02 sec)

* [Enhancement](ranger) Disable some permission operations when Ranger or LDAP are enabled (#32538)

Disable some permission operations when Ranger or LDAP are enabled.

* [chore](ci) exclude unstable trino_connector case (#32892)

Co-authored-by: stephen <[email protected]>

* [fix](Nereids) NPE when create table with implicit index type (#32893)

* [improvement](mtmv) Support more join types for query rewriting by materialized view (#32685)

This pattern of rewriting is supported for multi-table joins and supported join types is as following:

INNER JOIN
LEFT OUTER JOIN
RIGHT OUTER JOIN
FULL OUTER JOIN
LEFT SEMI JOIN
RIGHT SEMI JOIN
LEFT ANTI JOIN
RIGHT ANTI JOIN

* [Serde](Variant) support arrow serialization for varint type (#32780)

* [fix](multicatalog) fix no data error when read hive table on cosn (#32815)

Currently, when reading a hive on cosn table, doris return empty result, but the table has data.
iceberg on cosn is ok.
The reason is misuse of cosn's file sytem. according to cosn's doc, its fs.cosn.impl should be org.apache.hadoop.fs.CosFileSystem

* [fix](nereids)EliminateGroupByConstant should replace agg's output after removing constant group by keys (#32878)

* [Fix](executor)Fix regression test for test_active_queries/test_backend_active_tasks #32899

* [fix](iceberg) fix iceberg catalog bug and p2 test cases (#32898)

1. Fix iceberg catalog bug

    This PR #30198 change the logic of `IcebergHMSExternalCatalog.java`,
    to get locationUrl by calling hive metastore's `getCatalog()` method.
    But this method only exists in hive 3+. So it will fail if we using hive 2.x.

    I temporary remove this logic, because this logic is only used from iceberg table writing.
    Which is still under development. We will rethink this logic later.

2. Fix test cases

    Some of P2 test cases missed `order_qt`. And because the output format of the floating point
    type is changed, some result in `out` files need to be regenerated.

* [revert](jni) revert part of #32455 (#32904)

* [fix](spill) Avoid releasing resources while spill tasks are executing (#32783)

* [chore](log) print query id before logging profile in be.INFO (#32922)

* [fix](grace-exit) Stop incorrectly of reportwork cause heap use after free #32929

* [improvement](decommission be) decommission check replica num (#32748)

* [fix](arrow-flight) Fix reach limit of connections error (#32911)

Fix Reach limit of connections error
in fe.conf , arrow_flight_token_cache_size is mandatory less than qe_max_connection/2. arrow flight sql is a stateless protocol, connection is usually not actively disconnected, bearer token is evict from the cache will unregister ConnectContext.

Fix ConnectContext.command not be reset to COM_SLEEP in time, this will result in frequent kill connection after query timeout.

Fix bearer token evict log and exception.

TODO: use arrow flight session: https://mail.google.com/mail/u/0/#inbox/FMfcgzGxRdxBLQLTcvvtRpqsvmhrHpdH

* [bugfix](cloud) few variable not initialized (#32868)

../../cloud/src/recycler/meta_checker.cpp
can cause uninitialised memory read.

* [fix](arrow-flight) Fix arrow flight sql compatible with JDK 17 and upgrade arrow 15.0.2 (#32796)

--add-opens=java.base/java.nio=ALL-UNNAMED, see: https://arrow.apache.org/docs/java/install.html#java-compatibility
groovy use flight sql connection to execute query SUM(MAX(c1) OVER (PARTITION BY)) report error: AGGREGATE clause must not contain analytic expressions, but no problem in Java execute it with jdbc::arrow-flight-sql.
groovy not support print arrow array type, throw IndexOutOfBoundsException.
"arrow_flight_sql" not support two phase read
./run-regression-test.sh --run --clean -g arrow_flight_sql

* [fix](spill) SpillStream's writer maybe may not have been finalized (#32931)

* [improvement](spill) Disable DistinctStreamingAgg when spill is enabled (#32932)

* [Improve](inverted_index) update clucene and improve array inverted index writer  (#32436)

* [Performance](exec) replace SipHash in function by XXHash (#32919)

* [feature](agg) add aggregate function sum0 (#32541)

* [improvement](mtmv) Support to get tables in materialized view when collecting table in plan (#32797)

Support to get tables in materialized view when collecting table in plan

table scehma as fllowing:

create materialized view mv1
BUILD IMMEDIATE REFRESH COMPLETE ON MANUAL
DISTRIBUTED BY RANDOM BUCKETS 1 
PROPERTIES ('replication_num' = '1')
 as 
select 
  t1.c1, 
  t3.c2 
from 
  table1 t1 
  inner join table3 t3 on t1.c1 = t3.c2

if get table from the plan as follwoing, we can get [table1, table3, table2], the mv1 is expanded to get base tables;

SELECT 
  mv1.*, 
  uuid() 
FROM 
  mv1 LEFT SEMI 
  JOIN table2 ON mv1.c1 = table2.c1 
WHERE 
  mv1.c1 IN (
    SELECT 
      c1 
    FROM 
      table2
  ) 
  OR mv1.c1 < 10

* [enhance](mtmv)support olap table partition column is null (#32698)

* [enhancement](cloud) add table version to cloud (#32738)

Add table version to cloud.

In Fe:
Get: If Fe is cloud mode, get table version from meta service.
Update: Op drop/replace temp partition, commit transaction.

In meta service:
Add: create Index. init value is 1.
Remove: by recycler.
Update: commit/drop partition rpc, commit txn rpc. Atomic++.

* [fix](cloud) schema change from not null to null (#32913)

1. Use equals instead of == for type comparing
2. null bitmap size is reisze by size of ref column.

* [feature](Nereids): add ColumnPruningPostProcessor. (#32800)

* [case](rowpolicy)fix row policy has been exist (#32880)

* [fix](pipeline) fix use error row desc when origin block clear (#32803)

* [fix](Nereids) support variant column with index when create table (#32948)

* [opt](Nereids) support create table with variant type (#32953)

* [test](insert-overwrite) Add insert overwrite auto detect concurrency cases (#32935)

* [fix](compile) fe cannot compile in idea (#32955)

* [enhancement](plsql) Support select * from routines (#32866)

Support show of plsql procedure using select * from routines.

* [fix](trino-connector) fix `NoClassDefFoundError` of hudi `Utils` class (#32846)

Due to the change of this PR #32455 , the `trino-connector-scanner` package cannot access the `hudi_scanner` package, so the exception NoclassDeffounderror will appear.

We need to write a separate Utils class.

* [exec](column) change some complex column move to noexcept (#32954)

* [Enhancement](data skew) extends show data skew (#32732)

* [chore](test) let suite compatible with Nereids (#32964)

* Support identical column name in different index. (#32792)

* Limit the max string length to 1024 while collecting column stats to control BE memory usage. (#32470)

* [fix](merge-iterator) fix NOT_IMPLEMENTED_ERROR when read next block view (#32961)

* [improvement](executor)Add tag property for workload group #32874

* [fix](auth)unified workload and resource permission logic (#32907)

- `Grant resource` can no longer grant global `usage_priv`
-  `grant resource %` instead of `grant resource *`

before change:
```
grant usage_priv on resource * to f;
show grants for f\G
*************************** 1. row ***************************
      UserIdentity: 'f'@'%'
           Comment: 
          Password: No
             Roles: 
       GlobalPrivs: Usage_priv 
      CatalogPrivs: NULL
     DatabasePrivs: internal.information_schema: Select_priv ; internal.mysql: Select_priv 
        TablePrivs: NULL
          ColPrivs: NULL
     ResourcePrivs: NULL
 CloudClusterPrivs: NULL
WorkloadGroupPrivs: normal: Usage_priv 
```
after change
```
grant usage_priv on resource '%' to f;
show grants for f\G
*************************** 1. row ***************************
      UserIdentity: 'f'@'%'
           Comment: 
          Password: No
             Roles: 
       GlobalPrivs: NULL
      CatalogPrivs: NULL
     DatabasePrivs: internal.information_schema: Select_priv ; internal.mysql: Select_priv 
        TablePrivs: NULL
          ColPrivs: NULL
     ResourcePrivs: %: Usage_priv 
 CloudClusterPrivs: NULL
WorkloadGroupPrivs: normal: Usage_priv 

```

---------

Co-authored-by: yujun <[email protected]>
Co-authored-by: Gavin Chou <[email protected]>
Co-authored-by: xy720 <[email protected]>
Co-authored-by: yongjinhou <[email protected]>
Co-authored-by: Dongyang Li <[email protected]>
Co-authored-by: stephen <[email protected]>
Co-authored-by: morrySnow <[email protected]>
Co-authored-by: seawinde <[email protected]>
Co-authored-by: lihangyu <[email protected]>
Co-authored-by: Yulei-Yang <[email protected]>
Co-authored-by: starocean999 <[email protected]>
Co-authored-by: wangbo <[email protected]>
Co-authored-by: Mingyu Chen <[email protected]>
Co-authored-by: Jerry Hu <[email protected]>
Co-authored-by: zhiqiang <[email protected]>
Co-authored-by: Xinyi Zou <[email protected]>
Co-authored-by: Vallish Pai <[email protected]>
Co-authored-by: amory <[email protected]>
Co-authored-by: HappenLee <[email protected]>
Co-authored-by: Jensen <[email protected]>
Co-authored-by: zhangdong <[email protected]>
Co-authored-by: Yongqiang YANG <[email protected]>
Co-authored-by: jakevin <[email protected]>
Co-authored-by: Mryange <[email protected]>
Co-authored-by: zclllyybb <[email protected]>
Co-authored-by: Tiewei Fang <[email protected]>
Co-authored-by: Xin Liao <[email protected]>
@yiguolei yiguolei mentioned this pull request Apr 26, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. reviewed workload-group
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants