Skip to content

Conversation

Jibing-Li
Copy link
Contributor

What problem does this PR solve?

When execute multiple statements in one batch and CLIENT_MULTI_STATEMENTS is set, Doris server need to set SERVER_MORE_RESULTS_EXISTS flag in the return packet before the last statement. But when the Observer forward stmt to Master, this SERVER_MORE_RESULTS_EXISTS is not set, cause the following statements failed to execute.
This pr forward a boolean value to Master, so the Master FE knows it is the last statement or not, and could set SERVER_MORE_RESULTS_EXISTS correctly.

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • 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

@hello-stephen
Copy link
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?

@Jibing-Li Jibing-Li marked this pull request as ready for review September 5, 2025 06:36
@Jibing-Li
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 84.76% (1485/1752)
Line Coverage 68.09% (26681/39186)
Region Coverage 69.01% (13210/19141)
Branch Coverage 59.02% (7081/11998)

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 15.38% (2/13) 🎉
Increment coverage report
Complete coverage report

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17239	5265	5277	5265
q2	1988	330	246	246
q3	10012	1293	719	719
q4	10233	1104	558	558
q5	7525	2493	2353	2353
q6	186	170	137	137
q7	952	771	641	641
q8	9351	1328	1142	1142
q9	7100	5204	5204	5204
q10	6961	2387	1978	1978
q11	501	307	285	285
q12	368	370	254	254
q13	17800	3659	3035	3035
q14	233	230	232	230
q15	561	515	496	496
q16	448	431	387	387
q17	599	881	365	365
q18	7718	7113	7014	7014
q19	1176	960	579	579
q20	346	352	231	231
q21	3749	3203	2320	2320
q22	1079	1029	1009	1009
Total cold run time: 106125 ms
Total hot run time: 34448 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5170	5103	5142	5103
q2	253	356	233	233
q3	2245	2710	2314	2314
q4	1324	1802	1313	1313
q5	4225	4405	4578	4405
q6	221	168	132	132
q7	2064	1995	1945	1945
q8	2699	2653	2576	2576
q9	7499	7361	7422	7361
q10	3143	3290	2856	2856
q11	592	524	536	524
q12	676	798	663	663
q13	3623	3908	3267	3267
q14	319	319	311	311
q15	530	468	462	462
q16	478	492	463	463
q17	1206	1606	1369	1369
q18	7927	7635	7466	7466
q19	858	799	890	799
q20	1898	1949	1822	1822
q21	4820	4277	4378	4277
q22	1123	1035	1012	1012
Total cold run time: 52893 ms
Total hot run time: 50673 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 187324 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 86f7f3ff28731ab80e8bca43cd1612672bada796, data reload: false

query1	1049	461	438	438
query2	6554	1761	1799	1761
query3	6756	242	229	229
query4	26467	23334	22943	22943
query5	4439	683	519	519
query6	344	243	243	243
query7	4654	524	307	307
query8	326	294	273	273
query9	8700	2917	2889	2889
query10	462	357	304	304
query11	16658	15008	14856	14856
query12	169	119	126	119
query13	1672	557	449	449
query14	9201	5954	5859	5859
query15	215	194	173	173
query16	7239	674	483	483
query17	1217	742	623	623
query18	2013	429	342	342
query19	207	196	172	172
query20	137	126	129	126
query21	212	136	119	119
query22	4145	4179	4096	4096
query23	33869	32940	33006	32940
query24	8154	2426	2424	2424
query25	584	524	455	455
query26	1250	277	174	174
query27	2730	512	354	354
query28	4376	2272	2220	2220
query29	809	605	491	491
query30	292	219	197	197
query31	914	842	722	722
query32	92	90	80	80
query33	583	389	376	376
query34	795	865	545	545
query35	846	830	805	805
query36	982	1019	914	914
query37	128	114	93	93
query38	4134	4085	3985	3985
query39	1508	1424	1419	1419
query40	230	133	131	131
query41	63	73	62	62
query42	136	122	117	117
query43	536	530	477	477
query44	1329	883	865	865
query45	188	180	172	172
query46	871	1009	652	652
query47	1771	1819	1737	1737
query48	405	420	316	316
query49	782	512	422	422
query50	672	685	414	414
query51	4242	4152	4281	4152
query52	116	113	107	107
query53	255	272	199	199
query54	619	604	547	547
query55	95	92	91	91
query56	352	341	315	315
query57	1190	1219	1138	1138
query58	298	296	285	285
query59	2573	2618	2609	2609
query60	364	359	346	346
query61	168	168	162	162
query62	816	717	688	688
query63	240	210	205	205
query64	4640	1269	949	949
query65	4329	4239	4229	4229
query66	1204	471	372	372
query67	15493	15049	15119	15049
query68	7892	931	597	597
query69	507	357	315	315
query70	1202	1152	1151	1151
query71	589	379	401	379
query72	6006	5073	5117	5073
query73	690	680	360	360
query74	9193	9011	9070	9011
query75	3789	3086	2651	2651
query76	3482	1167	762	762
query77	826	416	329	329
query78	9590	9708	8854	8854
query79	2416	854	616	616
query80	650	645	530	530
query81	501	250	232	232
query82	467	148	110	110
query83	264	270	251	251
query84	264	114	91	91
query85	890	472	426	426
query86	396	323	331	323
query87	4248	4363	4184	4184
query88	3681	2236	2242	2236
query89	413	339	300	300
query90	1854	245	226	226
query91	164	180	136	136
query92	99	85	81	81
query93	1960	999	648	648
query94	701	425	329	329
query95	420	348	337	337
query96	486	571	282	282
query97	2617	2696	2551	2551
query98	257	221	218	218
query99	1438	1426	1410	1410
Total cold run time: 276811 ms
Total hot run time: 187324 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 30.67 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 86f7f3ff28731ab80e8bca43cd1612672bada796, data reload: false

query1	0.05	0.05	0.05
query2	0.12	0.07	0.06
query3	0.30	0.08	0.07
query4	1.62	0.09	0.09
query5	0.47	0.43	0.41
query6	1.17	0.65	0.64
query7	0.04	0.03	0.02
query8	0.07	0.06	0.06
query9	0.65	0.53	0.53
query10	0.60	0.59	0.58
query11	0.27	0.16	0.12
query12	0.26	0.14	0.13
query13	0.65	0.64	0.64
query14	0.83	0.83	0.84
query15	0.96	0.88	0.87
query16	0.40	0.39	0.39
query17	1.10	1.07	1.06
query18	0.23	0.22	0.22
query19	2.01	1.89	1.88
query20	0.01	0.02	0.02
query21	15.40	1.02	0.72
query22	0.94	1.09	0.86
query23	14.72	1.55	0.78
query24	4.78	0.64	0.35
query25	0.16	0.09	0.10
query26	0.56	0.21	0.18
query27	0.09	0.09	0.09
query28	11.20	1.17	0.58
query29	12.78	3.99	3.35
query30	0.32	0.12	0.10
query31	2.82	0.60	0.43
query32	3.24	0.59	0.51
query33	3.12	3.11	3.06
query34	16.53	5.51	4.81
query35	4.90	4.83	4.89
query36	0.66	0.52	0.52
query37	0.22	0.18	0.20
query38	0.19	0.18	0.17
query39	0.06	0.05	0.06
query40	0.21	0.17	0.19
query41	0.11	0.06	0.06
query42	0.06	0.06	0.06
query43	0.06	0.06	0.05
Total cold run time: 104.94 s
Total hot run time: 30.67 s

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 51.88% (17230/33212)
Line Coverage 37.28% (157213/421756)
Region Coverage 31.89% (119906/376013)
Branch Coverage 33.29% (52678/158232)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 70.65% (23040/32612)
Line Coverage 56.97% (240097/421480)
Region Coverage 52.36% (199707/381400)
Branch Coverage 54.07% (86042/159132)

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 15.38% (2/13) 🎉
Increment coverage report
Complete coverage report

@Jibing-Li
Copy link
Contributor Author

run p0

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 70.65% (23040/32612)
Line Coverage 56.97% (240110/421480)
Region Coverage 52.38% (199760/381400)
Branch Coverage 54.08% (86053/159132)

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 15.38% (2/13) 🎉
Increment coverage report
Complete coverage report

924060929
924060929 previously approved these changes Sep 8, 2025
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Sep 8, 2025
Copy link
Contributor

github-actions bot commented Sep 8, 2025

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

Copy link
Contributor

github-actions bot commented Sep 8, 2025

PR approved by anyone and no changes requested.

@morrySnow morrySnow added dev/2.1.x dev/3.0.x dev/3.1.x area/mysql-compatibility Issues or PRs related to the mysql compatibility labels Sep 8, 2025
@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Sep 8, 2025
@Jibing-Li
Copy link
Contributor Author

run buildall

morrySnow
morrySnow previously approved these changes Sep 8, 2025
Copy link
Contributor

github-actions bot commented Sep 8, 2025

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

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Sep 8, 2025
@hello-stephen
Copy link
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 84.83% (1493/1760)
Line Coverage 68.11% (26779/39317)
Region Coverage 69.03% (13256/19203)
Branch Coverage 59.06% (7104/12028)

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	16477	5196	5128	5128
q2	1985	346	223	223
q3	9785	1312	735	735
q4	9887	1041	519	519
q5	7562	2447	2316	2316
q6	185	170	139	139
q7	926	754	632	632
q8	9248	1373	1168	1168
q9	6972	5163	5130	5130
q10	6905	2412	1966	1966
q11	489	301	291	291
q12	356	366	231	231
q13	17777	3660	3056	3056
q14	243	239	213	213
q15	569	505	501	501
q16	1020	1004	970	970
q17	605	853	377	377
q18	7358	7233	7097	7097
q19	1108	994	588	588
q20	354	350	247	247
q21	4003	3177	2357	2357
q22	1090	1009	994	994
Total cold run time: 104904 ms
Total hot run time: 34878 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5116	5055	5088	5055
q2	257	341	226	226
q3	2173	2662	2298	2298
q4	1338	1768	1302	1302
q5	4207	4375	4482	4375
q6	239	179	140	140
q7	2078	1949	1890	1890
q8	2635	2616	2586	2586
q9	7326	7399	7387	7387
q10	3129	3331	2908	2908
q11	576	520	510	510
q12	698	776	685	685
q13	3525	3886	3288	3288
q14	287	315	356	315
q15	527	495	490	490
q16	1057	1085	1062	1062
q17	1207	1547	1408	1408
q18	8140	7612	7637	7612
q19	816	836	856	836
q20	2237	2071	1931	1931
q21	4974	4402	4310	4310
q22	1108	1068	1012	1012
Total cold run time: 53650 ms
Total hot run time: 51626 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 189784 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 7105bcb19a3f0259deeef3f2da95faeea0dd1d2b, data reload: false

query1	1031	464	415	415
query2	6565	1700	1711	1700
query3	6764	230	234	230
query4	26926	23418	23334	23334
query5	4421	671	558	558
query6	343	251	236	236
query7	4654	510	311	311
query8	332	267	252	252
query9	8639	2902	2908	2902
query10	489	361	291	291
query11	15774	15143	14808	14808
query12	183	121	121	121
query13	1666	569	434	434
query14	10698	9419	9306	9306
query15	212	206	177	177
query16	7356	670	531	531
query17	1234	772	641	641
query18	2022	446	356	356
query19	217	203	188	188
query20	144	133	137	133
query21	223	134	121	121
query22	4116	4210	4048	4048
query23	33781	33037	32967	32967
query24	7930	2370	2396	2370
query25	572	520	438	438
query26	1243	284	169	169
query27	2725	522	357	357
query28	4243	2272	2234	2234
query29	815	608	504	504
query30	298	229	194	194
query31	897	826	732	732
query32	91	82	79	79
query33	581	398	364	364
query34	808	849	527	527
query35	873	812	761	761
query36	977	1023	921	921
query37	132	115	93	93
query38	3564	3558	3480	3480
query39	1526	1437	1425	1425
query40	236	135	129	129
query41	76	63	62	62
query42	131	123	121	121
query43	537	504	450	450
query44	1393	885	869	869
query45	193	191	173	173
query46	883	1031	663	663
query47	1767	1836	1744	1744
query48	390	450	323	323
query49	742	567	428	428
query50	701	701	410	410
query51	3923	3945	3877	3877
query52	126	120	114	114
query53	257	279	204	204
query54	623	617	553	553
query55	100	90	100	90
query56	358	355	351	351
query57	1184	1199	1150	1150
query58	295	283	283	283
query59	2557	2685	2541	2541
query60	367	360	350	350
query61	172	162	167	162
query62	834	730	644	644
query63	236	211	199	199
query64	4342	1183	866	866
query65	4064	3984	3993	3984
query66	1170	494	378	378
query67	15445	15510	14906	14906
query68	7944	958	582	582
query69	514	345	357	345
query70	1379	1321	1278	1278
query71	588	345	324	324
query72	5893	4994	5075	4994
query73	723	628	363	363
query74	8907	9285	8970	8970
query75	3934	3264	2833	2833
query76	3671	1198	775	775
query77	823	413	347	347
query78	9601	9847	8942	8942
query79	1926	862	582	582
query80	674	581	537	537
query81	506	265	227	227
query82	223	167	140	140
query83	277	269	268	268
query84	272	123	102	102
query85	958	464	428	428
query86	385	303	324	303
query87	3760	3776	3737	3737
query88	2908	2241	2236	2236
query89	396	335	309	309
query90	1969	241	231	231
query91	170	174	133	133
query92	90	84	79	79
query93	2041	1015	643	643
query94	657	427	326	326
query95	493	337	328	328
query96	486	599	282	282
query97	2895	3001	2868	2868
query98	258	227	217	217
query99	1349	1420	1323	1323
Total cold run time: 274837 ms
Total hot run time: 189784 ms

@Jibing-Li
Copy link
Contributor Author

run external

@doris-robot
Copy link

ClickBench: Total hot run time: 30.92 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 7105bcb19a3f0259deeef3f2da95faeea0dd1d2b, data reload: false

query1	0.05	0.05	0.04
query2	0.11	0.06	0.06
query3	0.30	0.07	0.07
query4	1.64	0.09	0.09
query5	0.26	0.25	0.26
query6	1.20	0.65	0.64
query7	0.04	0.02	0.03
query8	0.07	0.05	0.05
query9	0.64	0.54	0.53
query10	0.59	0.60	0.59
query11	0.25	0.13	0.13
query12	0.25	0.15	0.14
query13	0.66	0.63	0.64
query14	1.03	1.06	1.06
query15	0.96	0.90	0.86
query16	0.40	0.39	0.40
query17	1.07	1.07	1.06
query18	0.23	0.22	0.22
query19	1.99	1.88	1.87
query20	0.01	0.02	0.02
query21	15.40	1.01	0.71
query22	0.92	1.06	0.87
query23	14.75	1.54	0.77
query24	4.92	0.63	0.36
query25	0.17	0.09	0.09
query26	0.55	0.21	0.18
query27	0.10	0.09	0.09
query28	11.14	1.17	0.58
query29	12.55	4.05	3.37
query30	0.32	0.12	0.10
query31	2.83	0.63	0.43
query32	3.26	0.62	0.51
query33	3.16	3.11	3.13
query34	16.37	5.52	4.87
query35	4.84	4.88	4.87
query36	0.65	0.53	0.51
query37	0.22	0.19	0.19
query38	0.19	0.18	0.18
query39	0.06	0.05	0.05
query40	0.21	0.18	0.18
query41	0.12	0.06	0.06
query42	0.06	0.06	0.06
query43	0.06	0.06	0.06
Total cold run time: 104.6 s
Total hot run time: 30.92 s

@Jibing-Li
Copy link
Contributor Author

run check_coverage

2 similar comments
@Jibing-Li
Copy link
Contributor Author

run check_coverage

@Jibing-Li
Copy link
Contributor Author

run check_coverage

@shuke987
Copy link
Collaborator

shuke987 commented Sep 9, 2025

skip coverage

@Jibing-Li Jibing-Li merged commit 7a59633 into apache:master Sep 9, 2025
28 of 30 checks passed
@Jibing-Li Jibing-Li deleted the forward branch September 9, 2025 01:51
Jibing-Li added a commit to Jibing-Li/incubator-doris that referenced this pull request Sep 10, 2025
… to master. (apache#55711)

When execute multiple statements in one batch and
CLIENT_MULTI_STATEMENTS is set, Doris server need to set
SERVER_MORE_RESULTS_EXISTS flag in the return packet before the last
statement. But when the Observer forward stmt to Master, this
SERVER_MORE_RESULTS_EXISTS is not set, cause the following statements
failed to execute.
This pr forward a boolean value to Master, so the Master FE knows it is
the last statement or not, and could set SERVER_MORE_RESULTS_EXISTS
correctly.
dataroaring pushed a commit that referenced this pull request Sep 11, 2025
morrySnow pushed a commit that referenced this pull request Sep 11, 2025
yiguolei pushed a commit that referenced this pull request Sep 11, 2025
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. area/mysql-compatibility Issues or PRs related to the mysql compatibility dev/2.1.12-merged dev/3.0.9-merged dev/3.1.1-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants