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

[chore] Fix unhandled exceptions thrown by stoi on streamload #49714

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tech-Circle-48
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #48859

Related PR: #xxx

Problem Summary:
fixes the issue where providing a timeout value exceeding the range of int32 causes a core dump during streamload.

The root cause is that the timeout value parsed using std::stoi() can throw a std::out_of_range exception if the value exceeds int32 limits, which wasn't handled correctly.

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 Mar 31, 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?

@Tech-Circle-48
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	26203	5082	5152	5082
q2	2101	278	182	182
q3	10399	1277	721	721
q4	10214	1001	528	528
q5	7570	2306	2402	2306
q6	188	164	134	134
q7	910	759	616	616
q8	9325	1315	1131	1131
q9	7036	5162	5168	5162
q10	6822	2316	1875	1875
q11	495	295	281	281
q12	350	353	224	224
q13	17767	3635	3097	3097
q14	236	245	220	220
q15	537	493	480	480
q16	641	617	576	576
q17	619	861	401	401
q18	7823	7260	7085	7085
q19	1226	958	565	565
q20	352	348	234	234
q21	4440	3570	2510	2510
q22	1029	1006	956	956
Total cold run time: 116283 ms
Total hot run time: 34366 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5185	5143	5103	5103
q2	234	331	229	229
q3	2166	2707	2278	2278
q4	1408	1851	1531	1531
q5	4514	4470	4372	4372
q6	209	162	124	124
q7	1950	1871	1744	1744
q8	2596	2489	2508	2489
q9	7199	7118	7188	7118
q10	2980	3134	2729	2729
q11	569	496	503	496
q12	705	777	616	616
q13	3498	3904	3275	3275
q14	274	284	293	284
q15	525	481	475	475
q16	640	702	656	656
q17	1157	1542	1363	1363
q18	7599	7586	7463	7463
q19	828	805	865	805
q20	1985	2026	1969	1969
q21	5217	4687	4697	4687
q22	1059	1019	978	978
Total cold run time: 52497 ms
Total hot run time: 50784 ms

@doris-robot
Copy link

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

query1	1042	510	483	483
query2	6554	1971	1954	1954
query3	6778	226	230	226
query4	26385	23779	23119	23119
query5	4345	636	490	490
query6	340	212	211	211
query7	4622	493	302	302
query8	298	239	235	235
query9	8642	2596	2595	2595
query10	491	326	268	268
query11	15724	15115	14823	14823
query12	171	105	107	105
query13	1651	530	381	381
query14	9835	6196	6279	6196
query15	223	187	170	170
query16	7598	642	465	465
query17	1173	711	587	587
query18	1993	391	304	304
query19	198	188	155	155
query20	124	121	116	116
query21	216	122	104	104
query22	4055	4109	4229	4109
query23	33967	32952	32888	32888
query24	8323	2379	2378	2378
query25	530	458	394	394
query26	1227	278	153	153
query27	2726	498	321	321
query28	4390	2418	2389	2389
query29	709	553	458	458
query30	288	223	192	192
query31	945	861	742	742
query32	72	69	64	64
query33	576	376	315	315
query34	814	861	521	521
query35	821	822	736	736
query36	960	983	912	912
query37	131	100	77	77
query38	4256	4310	4248	4248
query39	1438	1397	1430	1397
query40	213	122	107	107
query41	59	56	56	56
query42	120	108	113	108
query43	511	520	488	488
query44	1337	794	802	794
query45	179	185	168	168
query46	864	1039	635	635
query47	1796	1782	1735	1735
query48	387	414	307	307
query49	758	508	415	415
query50	669	697	397	397
query51	4180	4151	4196	4151
query52	109	105	95	95
query53	238	268	186	186
query54	584	579	516	516
query55	85	81	82	81
query56	318	297	297	297
query57	1145	1151	1074	1074
query58	288	257	260	257
query59	2564	2790	2679	2679
query60	342	339	314	314
query61	157	153	150	150
query62	781	730	709	709
query63	232	200	199	199
query64	4322	1104	821	821
query65	4329	4264	4229	4229
query66	1081	428	334	334
query67	15749	15503	15323	15323
query68	7881	901	519	519
query69	469	316	263	263
query70	1217	1086	1114	1086
query71	473	314	295	295
query72	5681	4751	4895	4751
query73	749	676	348	348
query74	8887	8951	8788	8788
query75	3859	3188	2708	2708
query76	3706	1212	767	767
query77	780	383	297	297
query78	10105	10233	9244	9244
query79	2316	807	567	567
query80	619	506	429	429
query81	476	263	222	222
query82	451	129	99	99
query83	296	260	232	232
query84	299	113	89	89
query85	795	352	351	351
query86	354	336	307	307
query87	4472	4464	4320	4320
query88	3388	2264	2248	2248
query89	391	316	283	283
query90	1967	227	226	226
query91	147	146	121	121
query92	82	70	56	56
query93	1611	962	594	594
query94	682	444	304	304
query95	439	305	290	290
query96	491	575	275	275
query97	3229	3233	3107	3107
query98	233	203	214	203
query99	1462	1412	1244	1244
Total cold run time: 276035 ms
Total hot run time: 186841 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.04
query2	0.13	0.10	0.10
query3	0.25	0.20	0.19
query4	1.58	0.20	0.20
query5	0.57	0.57	0.58
query6	1.22	0.72	0.71
query7	0.03	0.02	0.02
query8	0.04	0.03	0.04
query9	0.58	0.54	0.51
query10	0.59	0.60	0.57
query11	0.16	0.11	0.11
query12	0.15	0.12	0.12
query13	0.62	0.60	0.60
query14	2.67	2.67	2.71
query15	0.92	0.85	0.86
query16	0.37	0.38	0.38
query17	1.00	1.06	1.03
query18	0.20	0.20	0.20
query19	1.93	1.95	1.85
query20	0.01	0.02	0.01
query21	15.38	0.90	0.56
query22	0.78	1.36	0.70
query23	14.75	1.40	0.64
query24	7.18	1.16	1.37
query25	0.46	0.26	0.11
query26	0.55	0.17	0.13
query27	0.05	0.05	0.05
query28	10.36	0.87	0.44
query29	12.54	3.99	3.31
query30	0.25	0.10	0.07
query31	2.82	0.58	0.39
query32	3.23	0.55	0.47
query33	3.04	3.04	3.10
query34	15.76	5.13	4.45
query35	4.56	4.50	4.50
query36	0.66	0.49	0.49
query37	0.08	0.06	0.07
query38	0.05	0.04	0.03
query39	0.02	0.02	0.02
query40	0.17	0.13	0.13
query41	0.08	0.02	0.03
query42	0.04	0.03	0.02
query43	0.04	0.03	0.02
Total cold run time: 105.91 s
Total hot run time: 31.57 s

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 0.00% (0/28) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 51.33% (13736/26760)
Line Coverage 40.69% (119617/293960)
Region Coverage 39.42% (60941/154613)
Branch Coverage 34.22% (30588/89392)

fix2

format

modify level value

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

[Bug] be does not handle timeout out of range for streamload
4 participants