Skip to content

[fix](move-memtable) change brpc connection type to single#34883

Merged
dataroaring merged 4 commits into
apache:masterfrom
kaijchen:mm-rpc-type
May 15, 2024
Merged

[fix](move-memtable) change brpc connection type to single#34883
dataroaring merged 4 commits into
apache:masterfrom
kaijchen:mm-rpc-type

Conversation

@kaijchen

@kaijchen kaijchen commented May 15, 2024

Copy link
Copy Markdown
Member

Proposed changes

Previously, we use "pooled" connection to distinguish streaming connections
with non-streaming connections.

According to brpc docs connection-type:

Max number of pooled connections from one client to one server is limited
by -max_connection_pool_size.

Note the number is not same as “max number of connections”.
New connections are always created when there’s no idle ones in the pool;
the returned connections are closed immediately when the pool already
has max_connection_pool_size connections.

If there are too many connections, the connection will be closed immediately
once the initial open_load_stream rpc has finished. Causing the stream
to be closed in the meantime. Subsequent writes to the stream will encounter
"StreamWrite failed, err=22".

This PR changes brpc connection type to "single" for streaming connections.
And set brpc connection group to "streaming" to distinguish connections.

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@doris-robot

Copy link
Copy Markdown

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.

@kaijchen

Copy link
Copy Markdown
Member Author

run buildall

@github-actions

Copy link
Copy Markdown
Contributor

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

@doris-robot

Copy link
Copy Markdown

TeamCity be ut coverage result:
Function Coverage: 35.65% (8982/25192)
Line Coverage: 27.32% (74259/271804)
Region Coverage: 26.56% (38379/144520)
Branch Coverage: 23.37% (19571/83740)
Coverage Report: http://coverage.selectdb-in.cc/coverage/99dec41ce5b4c0c5816593ae70637b598ceb3933_99dec41ce5b4c0c5816593ae70637b598ceb3933/report/index.html

@doris-robot

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

------ Round 1 ----------------------------------
q1	17617	4241	4232	4232
q2	2022	183	185	183
q3	10477	1224	1162	1162
q4	10198	766	771	766
q5	7499	2704	2729	2704
q6	232	133	138	133
q7	1023	610	603	603
q8	9244	2150	2080	2080
q9	9400	6733	6722	6722
q10	9910	3888	3829	3829
q11	454	257	249	249
q12	537	226	236	226
q13	17215	3183	3296	3183
q14	271	218	226	218
q15	499	462	483	462
q16	470	377	397	377
q17	981	687	747	687
q18	8456	7852	7740	7740
q19	4609	1575	1565	1565
q20	619	333	325	325
q21	5339	4148	4094	4094
q22	363	293	282	282
Total cold run time: 117435 ms
Total hot run time: 41822 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4536	4381	4361	4361
q2	369	286	263	263
q3	3197	2939	2757	2757
q4	1907	1590	1674	1590
q5	5563	5529	5544	5529
q6	216	130	133	130
q7	2383	2029	2012	2012
q8	3284	3415	3438	3415
q9	8699	8736	8722	8722
q10	3929	3932	3883	3883
q11	599	484	489	484
q12	823	623	659	623
q13	17302	3202	3254	3202
q14	315	276	251	251
q15	514	476	466	466
q16	476	416	429	416
q17	1762	1488	1474	1474
q18	7871	9554	7985	7985
q19	1701	1514	1597	1514
q20	2063	1919	1835	1835
q21	8049	5071	5021	5021
q22	579	488	503	488
Total cold run time: 76137 ms
Total hot run time: 56421 ms

@doris-robot

Copy link
Copy Markdown
TPC-DS: Total hot run time: 187445 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 99dec41ce5b4c0c5816593ae70637b598ceb3933, data reload: false

query1	931	397	367	367
query2	6440	2520	2485	2485
query3	6651	209	215	209
query4	23018	21329	21295	21295
query5	4191	423	444	423
query6	261	172	179	172
query7	4591	312	291	291
query8	243	200	182	182
query9	8650	2428	2421	2421
query10	469	254	266	254
query11	14794	14201	14159	14159
query12	141	91	88	88
query13	1634	367	364	364
query14	10769	7583	8344	7583
query15	265	166	169	166
query16	8146	259	275	259
query17	1820	553	546	546
query18	2066	273	267	267
query19	329	151	145	145
query20	93	84	86	84
query21	197	124	131	124
query22	4987	4835	4810	4810
query23	34125	33611	33595	33595
query24	10585	2948	2807	2807
query25	588	372	367	367
query26	1165	162	161	161
query27	2858	334	340	334
query28	7461	2063	2060	2060
query29	876	620	603	603
query30	272	169	172	169
query31	971	766	719	719
query32	93	52	55	52
query33	745	252	245	245
query34	1008	488	485	485
query35	811	698	669	669
query36	1081	901	922	901
query37	141	67	73	67
query38	2903	2777	2741	2741
query39	1600	1550	1561	1550
query40	201	127	125	125
query41	47	44	43	43
query42	103	96	97	96
query43	565	573	549	549
query44	1205	717	733	717
query45	272	260	255	255
query46	1080	696	743	696
query47	1968	1881	1883	1881
query48	382	311	298	298
query49	856	402	420	402
query50	772	387	395	387
query51	6754	6671	6623	6623
query52	103	90	93	90
query53	351	277	286	277
query54	845	441	439	439
query55	81	74	77	74
query56	243	225	228	225
query57	1240	1172	1123	1123
query58	235	205	205	205
query59	3476	3324	3038	3038
query60	262	234	241	234
query61	119	86	89	86
query62	636	476	489	476
query63	311	282	282	282
query64	8691	7420	7420	7420
query65	3114	3093	3072	3072
query66	791	352	351	351
query67	15329	14881	15354	14881
query68	4737	536	557	536
query69	486	310	312	310
query70	1193	1158	1156	1156
query71	452	272	276	272
query72	7715	2669	2348	2348
query73	692	331	335	331
query74	6545	6202	6218	6202
query75	3508	2631	2698	2631
query76	3020	1015	1004	1004
query77	456	266	265	265
query78	10668	10273	10127	10127
query79	1775	522	520	520
query80	1059	434	426	426
query81	550	246	241	241
query82	937	95	99	95
query83	233	165	164	164
query84	247	85	84	84
query85	1358	269	273	269
query86	452	321	310	310
query87	3321	3078	3128	3078
query88	3495	2419	2471	2419
query89	476	381	380	380
query90	2108	198	192	192
query91	127	99	99	99
query92	61	49	50	49
query93	1752	514	512	512
query94	1383	185	189	185
query95	408	312	310	310
query96	592	272	275	272
query97	3123	2960	3008	2960
query98	241	225	216	216
query99	1212	941	918	918
Total cold run time: 282383 ms
Total hot run time: 187445 ms

@doris-robot

Copy link
Copy Markdown
ClickBench: Total hot run time: 30.51 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 99dec41ce5b4c0c5816593ae70637b598ceb3933, data reload: false

query1	0.04	0.04	0.03
query2	0.09	0.04	0.04
query3	0.23	0.06	0.05
query4	1.67	0.09	0.09
query5	0.50	0.49	0.50
query6	1.13	0.73	0.72
query7	0.02	0.01	0.01
query8	0.05	0.04	0.05
query9	0.55	0.48	0.49
query10	0.54	0.56	0.54
query11	0.15	0.11	0.11
query12	0.14	0.11	0.12
query13	0.60	0.59	0.59
query14	0.77	0.78	0.77
query15	0.83	0.81	0.80
query16	0.35	0.37	0.36
query17	0.96	1.01	0.99
query18	0.20	0.24	0.26
query19	1.75	1.76	1.65
query20	0.02	0.01	0.01
query21	15.49	0.69	0.68
query22	4.29	7.38	2.01
query23	18.29	1.49	1.29
query24	1.53	0.23	0.30
query25	0.14	0.09	0.08
query26	0.26	0.16	0.16
query27	0.08	0.07	0.09
query28	13.34	1.00	1.00
query29	13.35	3.26	3.26
query30	0.24	0.06	0.05
query31	2.90	0.39	0.38
query32	3.27	0.47	0.46
query33	2.77	2.77	2.87
query34	16.91	4.43	4.40
query35	4.47	4.52	4.62
query36	0.64	0.45	0.50
query37	0.17	0.15	0.15
query38	0.15	0.15	0.15
query39	0.04	0.04	0.03
query40	0.15	0.14	0.14
query41	0.08	0.04	0.05
query42	0.06	0.04	0.05
query43	0.04	0.04	0.03
Total cold run time: 109.25 s
Total hot run time: 30.51 s

Comment thread be/src/vec/sink/load_stream_stub.cpp Outdated
@kaijchen

Copy link
Copy Markdown
Member Author

run buildall

@github-actions

Copy link
Copy Markdown
Contributor

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

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

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

@doris-robot

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

------ Round 1 ----------------------------------
q1	17617	4462	4276	4276
q2	2024	190	201	190
q3	10563	1254	1171	1171
q4	10227	760	734	734
q5	7491	2651	2621	2621
q6	213	131	131	131
q7	998	578	559	559
q8	9422	2107	2090	2090
q9	9621	6539	6547	6539
q10	8922	3665	3686	3665
q11	469	250	241	241
q12	486	221	212	212
q13	17767	2960	2951	2951
q14	262	203	213	203
q15	496	479	470	470
q16	507	391	380	380
q17	973	692	720	692
q18	8237	7458	7407	7407
q19	1646	1567	1522	1522
q20	656	310	304	304
q21	5204	3215	4130	3215
q22	361	281	278	278
Total cold run time: 114162 ms
Total hot run time: 39851 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4216	4203	4215	4203
q2	367	270	259	259
q3	3024	2741	2795	2741
q4	1905	1643	1624	1624
q5	5257	5257	5298	5257
q6	209	124	126	124
q7	2264	1878	1879	1878
q8	3232	3313	3305	3305
q9	8364	8405	8394	8394
q10	3894	3671	3663	3663
q11	575	487	492	487
q12	750	607	630	607
q13	17343	2997	3020	2997
q14	308	257	246	246
q15	516	479	473	473
q16	469	414	423	414
q17	1811	1472	1482	1472
q18	7592	7676	7409	7409
q19	1668	1560	1588	1560
q20	1953	1771	1774	1771
q21	4854	4701	4800	4701
q22	567	497	502	497
Total cold run time: 71138 ms
Total hot run time: 54082 ms

@doris-robot

Copy link
Copy Markdown

TeamCity be ut coverage result:
Function Coverage: 35.66% (8984/25194)
Line Coverage: 27.33% (74285/271855)
Region Coverage: 26.56% (38392/144540)
Branch Coverage: 23.37% (19577/83754)
Coverage Report: http://coverage.selectdb-in.cc/coverage/4e13e152f055c0ecf182e80a5731fed379620257_4e13e152f055c0ecf182e80a5731fed379620257/report/index.html

@doris-robot

Copy link
Copy Markdown
TPC-DS: Total hot run time: 187088 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 4e13e152f055c0ecf182e80a5731fed379620257, data reload: false

query1	939	399	382	382
query2	6430	2451	2399	2399
query3	6640	209	212	209
query4	23968	21277	21449	21277
query5	4161	423	418	418
query6	265	176	182	176
query7	4595	301	298	298
query8	256	189	198	189
query9	8651	2440	2414	2414
query10	446	248	266	248
query11	14724	14473	14112	14112
query12	143	95	88	88
query13	1653	385	377	377
query14	9877	8432	7024	7024
query15	256	168	179	168
query16	8158	274	272	272
query17	1870	579	560	560
query18	2116	284	282	282
query19	207	152	156	152
query20	92	87	88	87
query21	194	131	169	131
query22	5084	4896	4894	4894
query23	34225	33585	33609	33585
query24	12110	2864	2839	2839
query25	661	388	375	375
query26	1742	166	161	161
query27	2976	323	333	323
query28	7605	2092	2072	2072
query29	1005	633	611	611
query30	310	171	173	171
query31	945	751	718	718
query32	91	52	56	52
query33	753	276	253	253
query34	1030	498	502	498
query35	810	690	670	670
query36	1090	896	919	896
query37	281	69	69	69
query38	2919	2762	2734	2734
query39	1605	1559	1544	1544
query40	284	128	131	128
query41	47	43	47	43
query42	105	97	97	97
query43	591	519	561	519
query44	1236	733	742	733
query45	267	253	223	223
query46	1090	745	752	745
query47	1926	1893	1871	1871
query48	370	299	298	298
query49	1191	412	404	404
query50	774	399	414	399
query51	6762	6764	6748	6748
query52	101	95	91	91
query53	357	291	315	291
query54	963	439	441	439
query55	76	73	73	73
query56	252	234	233	233
query57	1242	1128	1161	1128
query58	239	208	212	208
query59	3583	3224	3248	3224
query60	282	241	251	241
query61	89	90	85	85
query62	694	476	476	476
query63	310	288	291	288
query64	9689	7434	7354	7354
query65	3174	3129	3105	3105
query66	1352	356	341	341
query67	15218	15317	14787	14787
query68	4550	543	546	543
query69	485	298	319	298
query70	1144	1136	1133	1133
query71	409	270	292	270
query72	7033	2548	2396	2396
query73	704	323	327	323
query74	6554	6158	6080	6080
query75	3474	2636	2661	2636
query76	2845	1001	974	974
query77	512	277	272	272
query78	10622	10261	10122	10122
query79	2565	531	539	531
query80	1301	454	468	454
query81	502	248	248	248
query82	815	101	98	98
query83	218	168	168	168
query84	268	88	89	88
query85	1409	277	271	271
query86	453	305	330	305
query87	3252	3133	3102	3102
query88	4041	2435	2429	2429
query89	473	390	402	390
query90	1981	192	192	192
query91	183	95	97	95
query92	59	51	53	51
query93	2679	514	512	512
query94	1196	180	192	180
query95	399	300	308	300
query96	613	269	278	269
query97	3179	2964	3006	2964
query98	239	230	215	215
query99	1321	879	901	879
Total cold run time: 288625 ms
Total hot run time: 187088 ms

@doris-robot

Copy link
Copy Markdown
ClickBench: Total hot run time: 29.98 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 4e13e152f055c0ecf182e80a5731fed379620257, data reload: false

query1	0.04	0.03	0.04
query2	0.10	0.04	0.04
query3	0.23	0.06	0.06
query4	1.65	0.08	0.09
query5	0.51	0.49	0.52
query6	1.13	0.72	0.72
query7	0.02	0.01	0.01
query8	0.04	0.04	0.04
query9	0.53	0.49	0.49
query10	0.54	0.55	0.55
query11	0.16	0.11	0.11
query12	0.14	0.12	0.12
query13	0.60	0.58	0.59
query14	0.78	0.78	0.79
query15	0.82	0.81	0.81
query16	0.37	0.37	0.35
query17	0.99	0.96	1.01
query18	0.23	0.25	0.23
query19	1.79	1.70	1.74
query20	0.01	0.02	0.02
query21	15.72	0.65	0.65
query22	4.43	7.54	1.55
query23	18.29	1.38	1.25
query24	1.96	0.22	0.20
query25	0.15	0.08	0.07
query26	0.26	0.16	0.16
query27	0.08	0.08	0.07
query28	13.35	1.01	1.02
query29	13.17	3.30	3.28
query30	0.25	0.06	0.07
query31	2.82	0.38	0.37
query32	3.27	0.48	0.46
query33	2.86	2.85	2.81
query34	17.18	4.45	4.36
query35	4.50	4.52	4.46
query36	0.65	0.48	0.47
query37	0.17	0.16	0.15
query38	0.15	0.14	0.14
query39	0.04	0.03	0.04
query40	0.15	0.14	0.14
query41	0.09	0.05	0.05
query42	0.06	0.04	0.04
query43	0.04	0.03	0.04
Total cold run time: 110.32 s
Total hot run time: 29.98 s

@kaijchen

Copy link
Copy Markdown
Member Author

run buildall

@github-actions

Copy link
Copy Markdown
Contributor

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

@doris-robot

Copy link
Copy Markdown

TeamCity be ut coverage result:
Function Coverage: 35.66% (8984/25195)
Line Coverage: 27.32% (74270/271864)
Region Coverage: 26.55% (38377/144545)
Branch Coverage: 23.37% (19575/83756)
Coverage Report: http://coverage.selectdb-in.cc/coverage/572d6004dc7b31332df230ccb344494126a7a587_572d6004dc7b31332df230ccb344494126a7a587/report/index.html

@dataroaring dataroaring left a comment

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.

LGTM

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

@liaoxin01 liaoxin01 left a comment

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.

LGTM

@dataroaring dataroaring merged commit 359d216 into apache:master May 15, 2024
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/3.0.0-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants