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

[fix](sink) The issue with 2GB limit of protocol buffer #37990

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

mrhhsg
Copy link
Member

@mrhhsg mrhhsg commented Jul 17, 2024

Proposed changes

Fail to serialize doris.PFetchDataResult

If the size of PFetchDataResult is greater than 2G, protocol buffer cannot serialize the message.

@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.

@mrhhsg
Copy link
Member Author

mrhhsg commented Jul 17, 2024

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

be/src/vec/sink/vmysql_result_writer.cpp Show resolved Hide resolved
@@ -80,6 +81,13 @@ void GetResultBatchCtx::on_data(const std::unique_ptr<TFetchDataResult>& t_resul
result->set_packet_seq(packet_seq);
result->set_eos(eos);
}

/// The size limit of proto buffer message is 2G
if (result->ByteSizeLong() > std::numeric_limits<int32_t>::max()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

2G should be a config.
Set it to 1G.

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17877	4448	4365	4365
q2	2530	196	187	187
q3	12154	1151	1128	1128
q4	10364	787	885	787
q5	7712	2732	2742	2732
q6	228	142	137	137
q7	961	620	597	597
q8	9360	2071	2091	2071
q9	8762	6546	6572	6546
q10	8814	3842	3754	3754
q11	502	231	244	231
q12	396	232	226	226
q13	17755	2965	2973	2965
q14	292	227	239	227
q15	525	493	486	486
q16	502	395	387	387
q17	957	660	727	660
q18	8108	7702	7499	7499
q19	6751	1408	1349	1349
q20	657	320	332	320
q21	4961	3146	3195	3146
q22	348	289	279	279
Total cold run time: 120516 ms
Total hot run time: 40079 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4435	4251	4216	4216
q2	377	277	267	267
q3	3029	2778	2710	2710
q4	1854	1572	1632	1572
q5	5336	5307	5297	5297
q6	222	130	129	129
q7	2117	1677	1656	1656
q8	3191	3343	3301	3301
q9	8377	8345	8365	8345
q10	3880	3724	3733	3724
q11	582	491	502	491
q12	769	592	606	592
q13	17469	2992	3000	2992
q14	307	286	265	265
q15	508	490	481	481
q16	478	418	422	418
q17	1753	1491	1470	1470
q18	7718	7457	7436	7436
q19	1704	1514	1651	1514
q20	2015	1758	1785	1758
q21	9635	4624	4789	4624
q22	559	506	499	499
Total cold run time: 76315 ms
Total hot run time: 53757 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 173515 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 3da30be7fee716ee75cca24511db08ab8467bf12, data reload: false

query1	939	366	365	365
query2	6457	1918	1832	1832
query3	6669	217	215	215
query4	24757	17311	17236	17236
query5	4184	480	479	479
query6	266	164	169	164
query7	4592	286	284	284
query8	236	205	197	197
query9	8426	2384	2373	2373
query10	449	299	274	274
query11	10588	10000	10119	10000
query12	142	84	87	84
query13	1649	379	363	363
query14	10077	7577	7762	7577
query15	217	172	173	172
query16	7730	323	318	318
query17	1789	592	545	545
query18	1873	290	281	281
query19	208	157	157	157
query20	100	83	88	83
query21	209	130	124	124
query22	4391	4167	4109	4109
query23	33726	33157	33197	33157
query24	12080	2870	2844	2844
query25	681	393	398	393
query26	1740	153	154	153
query27	2940	274	279	274
query28	7244	1985	1993	1985
query29	1096	648	624	624
query30	290	151	150	150
query31	1010	759	761	759
query32	100	54	56	54
query33	790	328	321	321
query34	961	499	491	491
query35	680	592	599	592
query36	1095	969	930	930
query37	271	81	82	81
query38	2932	2715	2728	2715
query39	850	792	818	792
query40	289	122	123	122
query41	49	48	48	48
query42	117	99	101	99
query43	517	472	472	472
query44	1187	744	722	722
query45	194	162	163	162
query46	1093	752	736	736
query47	1848	1770	1770	1770
query48	370	293	305	293
query49	1222	438	417	417
query50	802	400	395	395
query51	6905	6814	6847	6814
query52	109	94	98	94
query53	360	294	297	294
query54	989	461	457	457
query55	76	76	78	76
query56	313	287	295	287
query57	1216	1084	1049	1049
query58	275	263	268	263
query59	3003	2648	2624	2624
query60	300	269	274	269
query61	101	93	108	93
query62	837	631	637	631
query63	317	286	283	283
query64	10436	2249	5976	2249
query65	3155	3079	3088	3079
query66	1382	333	343	333
query67	15718	14949	14939	14939
query68	7650	554	552	552
query69	758	494	365	365
query70	1238	1077	1142	1077
query71	528	280	282	280
query72	9287	5737	5610	5610
query73	782	328	325	325
query74	6133	5638	5668	5638
query75	5051	2723	2684	2684
query76	5016	976	907	907
query77	790	298	298	298
query78	9626	9572	9012	9012
query79	9431	523	524	523
query80	1001	487	476	476
query81	589	221	228	221
query82	285	140	133	133
query83	337	166	162	162
query84	279	85	91	85
query85	1017	341	291	291
query86	380	329	316	316
query87	3296	3091	3156	3091
query88	4828	2382	2367	2367
query89	506	370	388	370
query90	2179	192	192	192
query91	130	98	99	98
query92	61	49	48	48
query93	6146	503	505	503
query94	1517	211	211	211
query95	400	308	311	308
query96	603	277	268	268
query97	3187	3039	3050	3039
query98	210	206	194	194
query99	1504	1254	1287	1254
Total cold run time: 302359 ms
Total hot run time: 173515 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.08	0.03	0.04
query3	0.22	0.05	0.05
query4	1.68	0.08	0.08
query5	0.50	0.48	0.49
query6	1.13	0.72	0.73
query7	0.02	0.02	0.01
query8	0.05	0.04	0.04
query9	0.54	0.49	0.49
query10	0.54	0.55	0.56
query11	0.15	0.11	0.11
query12	0.15	0.12	0.13
query13	0.59	0.59	0.58
query14	0.76	0.79	0.79
query15	0.85	0.83	0.83
query16	0.37	0.37	0.37
query17	0.98	1.00	0.98
query18	0.23	0.22	0.21
query19	1.81	1.67	1.69
query20	0.01	0.01	0.01
query21	15.42	0.75	0.65
query22	4.79	6.82	2.28
query23	18.29	1.34	1.22
query24	2.10	0.24	0.23
query25	0.17	0.09	0.08
query26	0.30	0.21	0.21
query27	0.45	0.23	0.23
query28	13.22	1.03	1.03
query29	12.62	3.30	3.33
query30	0.26	0.06	0.05
query31	2.88	0.39	0.38
query32	3.28	0.48	0.46
query33	2.87	2.94	2.92
query34	16.86	4.36	4.33
query35	4.49	4.43	4.45
query36	0.66	0.46	0.48
query37	0.19	0.16	0.15
query38	0.16	0.15	0.15
query39	0.04	0.04	0.04
query40	0.15	0.12	0.13
query41	0.10	0.04	0.04
query42	0.06	0.05	0.05
query43	0.05	0.04	0.04
Total cold run time: 110.11 s
Total hot run time: 31 s

Block block;
RETURN_IF_ERROR(VExprContext::get_output_block_after_execute_exprs(_output_vexpr_ctxs,
input_block, &block));
constexpr static size_t MAX_BLOCK_SIZE = 1024L * 1024 * 1024;
Copy link
Contributor

Choose a reason for hiding this comment

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

change this to be.conf

Copy link
Contributor

Choose a reason for hiding this comment

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

change the default value to 128MB

@mrhhsg
Copy link
Member Author

mrhhsg commented Jul 19, 2024

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

be/src/vec/sink/vmysql_result_writer.cpp Show resolved Hide resolved
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jul 19, 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.

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18241	4732	4363	4363
q2	2648	197	195	195
q3	11704	1196	1143	1143
q4	10267	814	795	795
q5	7588	2765	2743	2743
q6	222	142	139	139
q7	959	612	608	608
q8	9281	2085	2115	2085
q9	8736	6588	6586	6586
q10	8630	3836	3850	3836
q11	498	237	236	236
q12	391	237	219	219
q13	17763	3020	2975	2975
q14	275	234	236	234
q15	529	479	491	479
q16	488	394	374	374
q17	986	643	705	643
q18	8032	7498	7382	7382
q19	7651	1404	1406	1404
q20	676	319	329	319
q21	4936	3034	3233	3034
q22	338	287	281	281
Total cold run time: 120839 ms
Total hot run time: 40073 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4385	4188	4309	4188
q2	388	270	274	270
q3	3015	2729	2743	2729
q4	1892	1575	1578	1575
q5	5310	5325	5321	5321
q6	219	129	130	129
q7	2144	1686	1678	1678
q8	3199	3359	3344	3344
q9	8437	8426	8393	8393
q10	3908	3758	3680	3680
q11	604	490	486	486
q12	742	597	617	597
q13	17636	2976	2959	2959
q14	305	277	282	277
q15	507	464	476	464
q16	485	410	416	410
q17	1810	1488	1464	1464
q18	7603	7421	7399	7399
q19	1671	1585	1661	1585
q20	1976	1795	1741	1741
q21	4984	4773	4740	4740
q22	604	513	518	513
Total cold run time: 71824 ms
Total hot run time: 53942 ms

@doris-robot
Copy link

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

query1	899	380	361	361
query2	6455	1943	1861	1861
query3	6651	210	217	210
query4	28076	17473	17370	17370
query5	4177	485	495	485
query6	277	182	180	180
query7	4592	289	288	288
query8	252	207	196	196
query9	8628	2464	2443	2443
query10	444	285	286	285
query11	10874	9965	10066	9965
query12	137	88	85	85
query13	1648	394	362	362
query14	10217	7664	6822	6822
query15	221	169	159	159
query16	7745	489	479	479
query17	1559	570	526	526
query18	1851	269	298	269
query19	194	150	149	149
query20	88	80	85	80
query21	217	141	126	126
query22	4352	4048	3975	3975
query23	33699	33203	32968	32968
query24	11989	2867	2883	2867
query25	663	368	374	368
query26	1761	147	147	147
query27	2932	264	275	264
query28	7574	2015	2039	2015
query29	1118	629	619	619
query30	282	145	145	145
query31	967	730	753	730
query32	88	52	55	52
query33	771	332	329	329
query34	903	476	480	476
query35	873	739	706	706
query36	1069	930	937	930
query37	283	78	78	78
query38	2840	2758	2771	2758
query39	886	801	805	801
query40	278	120	122	120
query41	47	46	44	44
query42	123	99	100	99
query43	495	460	454	454
query44	1211	733	735	733
query45	195	160	160	160
query46	1073	730	725	725
query47	1856	1758	1769	1758
query48	348	286	293	286
query49	1176	417	420	417
query50	772	395	395	395
query51	6987	6860	6735	6735
query52	104	92	95	92
query53	358	291	288	288
query54	1005	456	452	452
query55	73	74	74	74
query56	300	274	279	274
query57	1126	1046	1065	1046
query58	259	251	281	251
query59	2972	2751	2703	2703
query60	317	270	283	270
query61	98	96	136	96
query62	852	623	654	623
query63	324	294	284	284
query64	10475	2223	1659	1659
query65	3209	3149	3089	3089
query66	1354	355	328	328
query67	15201	15135	15112	15112
query68	4558	540	551	540
query69	466	337	392	337
query70	1128	1119	1131	1119
query71	390	292	283	283
query72	6920	5667	5996	5667
query73	738	326	329	326
query74	6289	5687	5617	5617
query75	3403	2724	2657	2657
query76	2375	905	879	879
query77	476	329	317	317
query78	9643	9013	8819	8819
query79	2697	511	517	511
query80	1886	479	488	479
query81	594	222	219	219
query82	861	138	135	135
query83	285	165	171	165
query84	264	90	90	90
query85	1552	321	300	300
query86	465	331	324	324
query87	3342	3111	3074	3074
query88	3761	2395	2365	2365
query89	474	378	376	376
query90	1805	202	198	198
query91	146	113	178	113
query92	72	52	50	50
query93	1933	509	511	509
query94	1190	315	299	299
query95	410	319	318	318
query96	593	271	269	269
query97	3199	3021	3016	3016
query98	225	198	200	198
query99	1611	1268	1292	1268
Total cold run time: 284591 ms
Total hot run time: 172333 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.08	0.04	0.04
query3	0.23	0.05	0.05
query4	1.67	0.09	0.09
query5	0.50	0.50	0.48
query6	1.14	0.72	0.72
query7	0.02	0.01	0.01
query8	0.05	0.04	0.04
query9	0.55	0.49	0.48
query10	0.55	0.53	0.56
query11	0.14	0.11	0.12
query12	0.14	0.12	0.13
query13	0.61	0.58	0.58
query14	0.75	0.76	0.78
query15	0.85	0.81	0.82
query16	0.35	0.37	0.38
query17	1.03	1.03	1.04
query18	0.22	0.21	0.22
query19	1.79	1.70	1.71
query20	0.01	0.01	0.01
query21	15.40	0.78	0.66
query22	4.42	6.76	2.37
query23	18.25	1.32	1.19
query24	2.05	0.23	0.22
query25	0.15	0.08	0.09
query26	0.30	0.20	0.20
query27	0.45	0.23	0.23
query28	13.36	1.01	0.98
query29	12.65	3.34	3.31
query30	0.26	0.06	0.06
query31	2.92	0.38	0.38
query32	3.23	0.47	0.48
query33	2.90	2.90	2.90
query34	16.90	4.35	4.34
query35	4.41	4.40	4.49
query36	0.65	0.47	0.48
query37	0.18	0.16	0.16
query38	0.15	0.15	0.15
query39	0.05	0.04	0.04
query40	0.15	0.13	0.12
query41	0.10	0.05	0.05
query42	0.05	0.05	0.05
query43	0.04	0.04	0.04
Total cold run time: 109.74 s
Total hot run time: 31.04 s

@yiguolei yiguolei merged commit f755809 into apache:master Jul 22, 2024
26 of 29 checks passed
dataroaring pushed a commit that referenced this pull request Jul 24, 2024
## Proposed changes

```
Fail to serialize doris.PFetchDataResult
```

If the size of `PFetchDataResult` is greater than 2G, protocol buffer
cannot serialize the message.
mrhhsg added a commit to mrhhsg/doris that referenced this pull request Aug 8, 2024
```
Fail to serialize doris.PFetchDataResult
```

If the size of `PFetchDataResult` is greater than 2G, protocol buffer
cannot serialize the message.
mrhhsg added a commit to mrhhsg/doris that referenced this pull request Aug 8, 2024
```
Fail to serialize doris.PFetchDataResult
```

If the size of `PFetchDataResult` is greater than 2G, protocol buffer
cannot serialize the message.
yiguolei pushed a commit that referenced this pull request Aug 8, 2024
)

```
Fail to serialize doris.PFetchDataResult
```

If the size of `PFetchDataResult` is greater than 2G, protocol buffer
cannot serialize the message.

pick #37990
@yiguolei yiguolei removed the dev/2.1.x label Aug 8, 2024
@yiguolei yiguolei mentioned this pull request Sep 5, 2024
3 tasks
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.6-merged dev/3.0.1-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants