Skip to content

Conversation

@zddr
Copy link
Contributor

@zddr zddr commented Sep 9, 2025

What problem does this PR solve?

kill connection should not call threadLocalInfo.remove();,it will make current thread getConnection is null

The current historical legacy issue: after killing the connection, it is not possible to execute threadLocalInfo. remove() on the corresponding thread; Resulting in more memory usage

Related PR: #55008

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

@Thearas
Copy link
Contributor

Thearas commented Sep 9, 2025

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?

@zddr
Copy link
Contributor Author

zddr commented Sep 9, 2025

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17633	5182	5051	5051
q2	1979	340	216	216
q3	10230	1300	700	700
q4	10230	1007	519	519
q5	7530	2387	2331	2331
q6	181	164	139	139
q7	916	759	645	645
q8	9340	1322	1032	1032
q9	6854	5193	5196	5193
q10	6936	2430	1985	1985
q11	495	302	270	270
q12	356	386	218	218
q13	17758	3662	2990	2990
q14	239	235	206	206
q15	575	480	485	480
q16	1009	1000	959	959
q17	605	850	353	353
q18	7458	7195	7119	7119
q19	1382	948	544	544
q20	339	330	233	233
q21	3606	2550	2324	2324
q22	1072	1022	986	986
Total cold run time: 106723 ms
Total hot run time: 34493 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5165	5058	5059	5058
q2	241	328	221	221
q3	2208	2661	2265	2265
q4	1330	1794	1311	1311
q5	4219	4457	4529	4457
q6	219	184	135	135
q7	2064	1895	1840	1840
q8	2695	2497	2512	2497
q9	7335	7389	7419	7389
q10	3099	3333	2868	2868
q11	561	513	488	488
q12	714	777	625	625
q13	3729	3827	3223	3223
q14	316	320	276	276
q15	537	505	473	473
q16	1118	1085	1034	1034
q17	1194	1671	1362	1362
q18	7858	7761	7755	7755
q19	771	849	919	849
q20	1898	1950	1797	1797
q21	4768	4284	4295	4284
q22	1069	1040	1022	1022
Total cold run time: 53108 ms
Total hot run time: 51229 ms

@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2025

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

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels Sep 9, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2025

PR approved by anyone and no changes requested.

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 77.78% (7/9) 🎉
Increment coverage report
Complete coverage report

@zddr
Copy link
Contributor Author

zddr commented Sep 9, 2025

run p0

@zddr
Copy link
Contributor Author

zddr commented Sep 9, 2025

run cloud_p0

@zddr
Copy link
Contributor Author

zddr commented Sep 9, 2025

run performance

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 77.78% (7/9) 🎉
Increment coverage report
Complete coverage report

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17611	5247	5101	5101
q2	2027	340	235	235
q3	10185	1306	715	715
q4	10232	1033	523	523
q5	7540	2464	2373	2373
q6	190	170	141	141
q7	959	765	642	642
q8	9360	1339	1113	1113
q9	7048	5209	5193	5193
q10	6976	2383	1989	1989
q11	483	298	280	280
q12	376	363	231	231
q13	17777	3685	3088	3088
q14	259	245	225	225
q15	583	506	492	492
q16	1032	1003	945	945
q17	615	884	362	362
q18	7818	7286	7041	7041
q19	1435	992	575	575
q20	341	344	229	229
q21	3836	3244	2400	2400
q22	1077	1017	1002	1002
Total cold run time: 107760 ms
Total hot run time: 34895 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5199	5140	5128	5128
q2	245	333	229	229
q3	2201	2725	2295	2295
q4	1365	1781	1358	1358
q5	4310	4641	4604	4604
q6	229	177	136	136
q7	2026	1986	1828	1828
q8	2649	2669	2650	2650
q9	7381	7501	7180	7180
q10	3103	3299	2973	2973
q11	601	526	521	521
q12	722	852	669	669
q13	3522	3877	3391	3391
q14	304	324	276	276
q15	506	536	490	490
q16	1105	1104	1090	1090
q17	1193	1573	1396	1396
q18	7834	7703	7570	7570
q19	844	875	845	845
q20	2028	2057	1932	1932
q21	5181	4321	4388	4321
q22	1088	1044	1006	1006
Total cold run time: 53636 ms
Total hot run time: 51888 ms

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 77.78% (7/9) 🎉
Increment coverage report
Complete coverage report

@zddr
Copy link
Contributor Author

zddr commented Sep 10, 2025

run buildall

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 88.89% (8/9) 🎉
Increment coverage report
Complete coverage report

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17622	5261	5072	5072
q2	1997	323	208	208
q3	10264	1318	733	733
q4	10254	1034	532	532
q5	7564	2426	2391	2391
q6	191	169	138	138
q7	947	781	642	642
q8	9375	1382	1205	1205
q9	7049	5195	5256	5195
q10	6900	2400	1985	1985
q11	503	306	282	282
q12	356	368	223	223
q13	17775	3676	3030	3030
q14	249	251	220	220
q15	562	489	506	489
q16	1049	1005	956	956
q17	606	888	384	384
q18	7516	7153	7197	7153
q19	1243	1095	561	561
q20	346	346	242	242
q21	3760	3133	2363	2363
q22	1076	1019	986	986
Total cold run time: 107204 ms
Total hot run time: 34990 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5535	5091	5136	5091
q2	249	337	227	227
q3	2234	2721	2354	2354
q4	1343	1794	1333	1333
q5	4332	4680	4573	4573
q6	225	177	128	128
q7	2046	2004	1823	1823
q8	2653	2723	2788	2723
q9	7387	7421	7297	7297
q10	3094	3376	2941	2941
q11	593	488	498	488
q12	715	786	659	659
q13	3594	4038	3327	3327
q14	310	335	291	291
q15	522	485	496	485
q16	1070	1089	1051	1051
q17	1176	1556	1446	1446
q18	7926	7822	7670	7670
q19	815	900	1074	900
q20	2028	2062	1878	1878
q21	4965	4488	4277	4277
q22	1088	1058	1022	1022
Total cold run time: 53900 ms
Total hot run time: 51984 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 189760 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 5213383ea4c3e5895d572f98ec32568df8320e34, data reload: false

query1	1071	465	407	407
query2	6568	1678	1709	1678
query3	6758	223	225	223
query4	26271	23249	23153	23153
query5	4384	635	562	562
query6	356	258	243	243
query7	4657	528	299	299
query8	308	274	257	257
query9	8683	2917	2908	2908
query10	511	367	300	300
query11	15943	15023	14707	14707
query12	181	124	123	123
query13	1692	562	431	431
query14	10799	9168	9273	9168
query15	218	197	186	186
query16	7741	666	525	525
query17	1394	783	662	662
query18	2063	454	365	365
query19	220	260	186	186
query20	137	137	130	130
query21	211	130	113	113
query22	4122	4248	4295	4248
query23	33997	33087	33168	33087
query24	8172	2368	2411	2368
query25	554	525	457	457
query26	1234	281	167	167
query27	2688	518	352	352
query28	4408	2258	2249	2249
query29	802	613	495	495
query30	295	230	205	205
query31	936	844	716	716
query32	90	82	84	82
query33	576	393	362	362
query34	795	875	551	551
query35	832	852	751	751
query36	959	1028	923	923
query37	129	120	100	100
query38	3573	3549	3562	3549
query39	1472	1488	1409	1409
query40	232	140	130	130
query41	66	63	63	63
query42	129	120	118	118
query43	513	521	485	485
query44	1348	870	873	870
query45	183	185	178	178
query46	858	1018	666	666
query47	1778	1812	1736	1736
query48	391	416	319	319
query49	756	533	429	429
query50	676	701	415	415
query51	4063	3916	3949	3916
query52	123	115	109	109
query53	248	260	204	204
query54	614	621	555	555
query55	98	89	94	89
query56	358	342	323	323
query57	1207	1213	1139	1139
query58	302	288	290	288
query59	2571	2685	2491	2491
query60	408	372	370	370
query61	176	167	168	167
query62	806	754	672	672
query63	230	206	207	206
query64	4420	1167	852	852
query65	4084	3960	3981	3960
query66	1122	437	348	348
query67	15589	15374	15400	15374
query68	9452	917	597	597
query69	501	334	304	304
query70	1327	1350	1255	1255
query71	577	355	323	323
query72	5898	5199	5022	5022
query73	750	628	372	372
query74	8919	9230	8912	8912
query75	4365	3273	2735	2735
query76	4476	1173	745	745
query77	1010	407	343	343
query78	9528	9725	8841	8841
query79	5589	779	570	570
query80	720	589	526	526
query81	477	253	226	226
query82	399	168	136	136
query83	292	273	252	252
query84	301	122	96	96
query85	943	483	426	426
query86	342	322	341	322
query87	3790	3744	3644	3644
query88	2858	2210	2250	2210
query89	438	335	299	299
query90	2074	234	228	228
query91	244	164	146	146
query92	89	75	78	75
query93	3255	964	649	649
query94	690	405	333	333
query95	426	362	332	332
query96	480	594	275	275
query97	2901	2968	2867	2867
query98	244	234	212	212
query99	1418	1391	1318	1318
Total cold run time: 283922 ms
Total hot run time: 189760 ms

@doris-robot
Copy link

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

query1	0.06	0.04	0.05
query2	0.09	0.05	0.06
query3	0.26	0.09	0.08
query4	1.61	0.11	0.12
query5	0.28	0.28	0.26
query6	1.18	0.66	0.65
query7	0.02	0.03	0.03
query8	0.05	0.04	0.04
query9	0.63	0.52	0.52
query10	0.59	0.58	0.59
query11	0.16	0.11	0.12
query12	0.16	0.12	0.12
query13	0.63	0.63	0.62
query14	1.01	1.02	1.06
query15	0.88	0.85	0.84
query16	0.40	0.41	0.39
query17	1.03	1.04	1.04
query18	0.22	0.20	0.20
query19	1.91	1.92	1.82
query20	0.01	0.02	0.02
query21	15.41	0.95	0.60
query22	0.76	1.28	0.73
query23	14.81	1.41	0.64
query24	6.69	1.61	0.37
query25	0.32	0.18	0.13
query26	0.54	0.17	0.13
query27	0.06	0.06	0.06
query28	9.18	0.95	0.45
query29	12.60	3.96	3.28
query30	0.29	0.13	0.12
query31	2.83	0.61	0.38
query32	3.23	0.55	0.50
query33	3.18	3.06	3.18
query34	15.96	5.46	4.85
query35	5.01	4.90	4.93
query36	0.72	0.52	0.50
query37	0.12	0.07	0.07
query38	0.07	0.05	0.04
query39	0.04	0.03	0.03
query40	0.17	0.15	0.15
query41	0.08	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.03
Total cold run time: 103.33 s
Total hot run time: 29.62 s

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 77.78% (7/9) 🎉
Increment coverage report
Complete coverage report

2 similar comments
@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 77.78% (7/9) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 77.78% (7/9) 🎉
Increment coverage report
Complete coverage report

@zddr
Copy link
Contributor Author

zddr commented Sep 10, 2025

run p0

@hello-stephen
Copy link
Contributor

FE Regression Coverage Report

Increment line coverage 77.78% (7/9) 🎉
Increment coverage report
Complete coverage report

morrySnow pushed a commit that referenced this pull request Sep 11, 2025
…d when the connection is disconnected due to timeout. #55008 #55809 (#55396)

pick #55008 #55809
@morrySnow morrySnow mentioned this pull request Sep 22, 2025
Hastyshell pushed a commit to Hastyshell/doris that referenced this pull request Nov 12, 2025
yiguolei pushed a commit to yiguolei/incubator-doris that referenced this pull request Dec 19, 2025
…led (apache#55809)

kill connection should not call `threadLocalInfo.remove();`,it will make
current thread `getConnection` is null

The current historical legacy issue: after killing the connection, it is
not possible to execute threadLocalInfo. remove() on the corresponding
thread; Resulting in more memory usage

Related PR: apache#55008
# Conflicts:
#	fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java
#	fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/sessions/FlightSqlConnectContext.java
yiguolei pushed a commit to yiguolei/incubator-doris that referenced this pull request Dec 19, 2025
…led (apache#55809)

kill connection should not call `threadLocalInfo.remove();`,it will make
current thread `getConnection` is null

The current historical legacy issue: after killing the connection, it is
not possible to execute threadLocalInfo. remove() on the corresponding
thread; Resulting in more memory usage

Related PR: apache#55008
# Conflicts:
#	fe/fe-core/src/main/java/org/apache/doris/qe/ConnectContext.java
#	fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/sessions/FlightSqlConnectContext.java
yiguolei pushed a commit to yiguolei/incubator-doris that referenced this pull request Dec 19, 2025
yiguolei added a commit to yiguolei/incubator-doris that referenced this pull request Dec 19, 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. dev/2.1.x dev/2.1.x-conflict dev/3.1.1-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants