Skip to content

[fix](fe) Fix SHOW TRASH ON clause to support multiple backends#63860

Open
heguanhui wants to merge 1 commit into
apache:masterfrom
heguanhui:fix/show-trash-on-multi-be
Open

[fix](fe) Fix SHOW TRASH ON clause to support multiple backends#63860
heguanhui wants to merge 1 commit into
apache:masterfrom
heguanhui:fix/show-trash-on-multi-be

Conversation

@heguanhui
Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #xxx

Problem Summary: SHOW TRASH ON clause has two bugs:

  1. The ON clause is silently ignored due to a missing return statement in LogicalPlanBuilder.visitShowTrash(), causing SHOW TRASH ON "be:9050" to always return trash info for all backends instead of the specified one.
  2. SHOW TRASH ON only supports a single backend string literal, while ADMIN CLEAN TRASH ON supports multiple backends with parenthesized comma-separated list. The syntax is inconsistent between the two related statements.

Release note

Fix SHOW TRASH ON clause to support multiple backends with the same syntax as ADMIN CLEAN TRASH ON, e.g. SHOW TRASH ON ("be1:9050", "be2:9050"). Previously the ON clause was silently ignored due to a missing return.

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test
    • No need to test
  • Behavior changed:

    • No.
    • Yes. SHOW TRASH ON now requires parenthesized list syntax consistent with ADMIN CLEAN TRASH ON.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

### What problem does this PR solve?

Issue Number: close #xxx

Problem Summary: SHOW TRASH ON clause has two bugs:
1. The ON clause is silently ignored due to a missing return statement in
   LogicalPlanBuilder.visitShowTrash(), causing SHOW TRASH ON "be:9050"
   to always return trash info for all backends instead of the specified one.
2. SHOW TRASH ON only supports a single backend string literal, while
   ADMIN CLEAN TRASH ON supports multiple backends with parenthesized
   comma-separated list. The syntax is inconsistent between the two
   related statements.

### Release note

Fix SHOW TRASH ON clause to support multiple backends with the same
syntax as ADMIN CLEAN TRASH ON, e.g. SHOW TRASH ON ("be1:9050", "be2:9050").
Previously the ON clause was silently ignored due to a missing return.

### Check List (For Author)

- Test: Regression test
- Behavior changed: Yes. SHOW TRASH ON now requires parenthesized list
  syntax consistent with ADMIN CLEAN TRASH ON.
- Does this need documentation: No
@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?

@heguanhui
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 31218 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 7db0866929f809cd2412d943b98fd56b30b9a833, 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	17694	4027	3983	3983
q2	q3	10752	1390	801	801
q4	4685	474	354	354
q5	7564	2259	2099	2099
q6	252	181	135	135
q7	954	790	657	657
q8	9363	1652	1581	1581
q9	6286	5009	4950	4950
q10	6433	2226	1887	1887
q11	437	278	246	246
q12	687	424	293	293
q13	18185	3351	2728	2728
q14	262	256	235	235
q15	q16	823	788	705	705
q17	975	923	964	923
q18	6863	5773	5621	5621
q19	1175	1313	1086	1086
q20	523	405	262	262
q21	5751	2523	2374	2374
q22	437	351	298	298
Total cold run time: 100101 ms
Total hot run time: 31218 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	4362	4277	4260	4260
q2	q3	4490	4908	4366	4366
q4	2095	2193	1402	1402
q5	4439	4298	4309	4298
q6	231	187	208	187
q7	2123	1782	1585	1585
q8	2567	2190	2214	2190
q9	8197	7968	8201	7968
q10	4826	4825	4343	4343
q11	762	417	379	379
q12	734	767	537	537
q13	3292	3574	3005	3005
q14	314	325	275	275
q15	q16	754	738	633	633
q17	1359	1324	1326	1324
q18	8039	7373	7041	7041
q19	1111	1105	1093	1093
q20	2226	2218	1951	1951
q21	5289	4604	4454	4454
q22	535	454	406	406
Total cold run time: 57745 ms
Total hot run time: 51697 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

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

query5	4354	661	532	532
query6	349	228	207	207
query7	4260	555	309	309
query8	340	243	216	216
query9	8788	4010	4049	4010
query10	489	343	301	301
query11	5822	2428	2257	2257
query12	177	127	127	127
query13	1287	610	436	436
query14	6039	5454	5144	5144
query14_1	4484	4445	4448	4445
query15	209	208	181	181
query16	1017	442	437	437
query17	1095	792	622	622
query18	2540	490	380	380
query19	224	207	168	168
query20	140	133	132	132
query21	223	151	122	122
query22	13692	13582	13403	13403
query23	17363	16480	16281	16281
query23_1	16435	16364	16391	16364
query24	7466	1795	1338	1338
query24_1	1349	1341	1337	1337
query25	587	510	439	439
query26	1332	341	174	174
query27	2680	573	354	354
query28	4480	2013	2015	2013
query29	1045	654	527	527
query30	303	241	200	200
query31	1144	1087	967	967
query32	96	78	78	78
query33	564	375	304	304
query34	1168	1172	670	670
query35	790	804	724	724
query36	1397	1396	1272	1272
query37	155	109	92	92
query38	3241	3215	3045	3045
query39	936	927	913	913
query39_1	929	871	897	871
query40	231	153	130	130
query41	77	68	70	68
query42	116	110	111	110
query43	336	346	301	301
query44	
query45	218	214	204	204
query46	1088	1206	765	765
query47	2388	2391	2310	2310
query48	400	426	326	326
query49	653	512	409	409
query50	1009	359	260	260
query51	4457	4387	4228	4228
query52	108	106	95	95
query53	258	278	213	213
query54	338	286	271	271
query55	98	96	89	89
query56	318	324	331	324
query57	1437	1438	1360	1360
query58	300	278	274	274
query59	1645	1649	1504	1504
query60	323	334	310	310
query61	167	159	157	157
query62	696	650	580	580
query63	250	200	214	200
query64	2423	810	635	635
query65	
query66	1697	476	361	361
query67	29898	29809	29527	29527
query68	
query69	471	344	311	311
query70	1055	1046	1023	1023
query71	307	281	275	275
query72	2945	2684	2431	2431
query73	857	790	433	433
query74	5098	4970	4886	4886
query75	2685	2672	2287	2287
query76	2297	1164	760	760
query77	396	428	342	342
query78	12550	12553	11950	11950
query79	1465	1069	768	768
query80	1330	540	464	464
query81	489	286	251	251
query82	1412	165	129	129
query83	354	272	260	260
query84	279	143	116	116
query85	925	539	457	457
query86	459	349	292	292
query87	3459	3406	3238	3238
query88	3652	2769	2694	2694
query89	452	393	340	340
query90	1887	186	192	186
query91	188	169	140	140
query92	83	79	73	73
query93	1489	1458	915	915
query94	733	351	324	324
query95	671	411	361	361
query96	1153	795	347	347
query97	2757	2752	2604	2604
query98	243	236	232	232
query99	1178	1140	1018	1018
Total cold run time: 256311 ms
Total hot run time: 172298 ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants