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](deltawriter) Enhance file_size validation in _request_slave_tablet_pull_rowset method #48866

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

Tech-Circle-48
Copy link
Contributor

@Tech-Circle-48 Tech-Circle-48 commented Mar 10, 2025

What problem does this PR solve?

Issue Number: close

Related PR:

Problem Summary:Enhance file_size validation when synchronizing tablet replicas to other slave nodes check in _request_slave_tablet_pull_rowset on BE.

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?

@Tech-Circle-48
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17600	5256	5099	5099
q2	2051	308	166	166
q3	10408	1352	709	709
q4	10220	1008	557	557
q5	7521	2442	2350	2350
q6	190	163	130	130
q7	926	722	603	603
q8	9294	1220	1125	1125
q9	5132	4832	4656	4656
q10	6844	2317	1896	1896
q11	465	264	253	253
q12	360	360	221	221
q13	17783	3692	3203	3203
q14	234	235	220	220
q15	530	475	482	475
q16	620	626	580	580
q17	578	872	351	351
q18	6932	6416	6266	6266
q19	1234	954	556	556
q20	318	333	202	202
q21	2842	2228	1984	1984
q22	1022	1012	978	978
Total cold run time: 103104 ms
Total hot run time: 32580 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5185	5133	5108	5108
q2	243	331	233	233
q3	2151	2711	2338	2338
q4	1512	1846	1388	1388
q5	4241	4115	4218	4115
q6	210	163	123	123
q7	1848	1984	1748	1748
q8	2628	2545	2530	2530
q9	7334	7204	7093	7093
q10	3001	3224	2789	2789
q11	594	513	479	479
q12	694	782	631	631
q13	3594	3920	3258	3258
q14	270	296	275	275
q15	512	476	464	464
q16	657	683	642	642
q17	1163	1555	1387	1387
q18	7731	7646	7314	7314
q19	821	835	920	835
q20	1989	2023	1866	1866
q21	5461	5080	4901	4901
q22	1133	1048	1010	1010
Total cold run time: 52972 ms
Total hot run time: 50527 ms

(*(request->mutable_inverted_indices_size()))[segment_id];
// Add the new index size to the map value.
*index_size_map_value.mutable_index_sizes()->Add() = std::move(index_size);
int64_t size = safe_get_file_size(inverted_index_file);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should return directly instead of not executing the logic if there is an exception?

@doris-robot
Copy link

TPC-DS: Total hot run time: 185736 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 4005ab59daead76c5b48bc4319cb52d6edb9fbe1, data reload: false

query1	987	393	374	374
query2	6544	1936	1946	1936
query3	6788	213	219	213
query4	26657	23579	23434	23434
query5	4365	689	493	493
query6	312	204	195	195
query7	4602	496	308	308
query8	296	261	246	246
query9	8601	2628	2632	2628
query10	498	312	268	268
query11	15716	15125	14846	14846
query12	157	111	111	111
query13	1666	540	402	402
query14	8882	6260	6748	6260
query15	221	195	176	176
query16	7522	657	522	522
query17	1205	695	543	543
query18	1962	404	300	300
query19	189	179	162	162
query20	121	113	114	113
query21	242	123	101	101
query22	4180	4185	4251	4185
query23	34077	33194	32935	32935
query24	7640	2394	2369	2369
query25	526	447	389	389
query26	1217	271	153	153
query27	2526	462	337	337
query28	4268	2436	2441	2436
query29	750	558	434	434
query30	308	213	188	188
query31	948	862	772	772
query32	73	60	64	60
query33	554	354	305	305
query34	806	820	519	519
query35	783	820	738	738
query36	964	984	871	871
query37	117	95	79	79
query38	4217	4175	4184	4175
query39	1461	1408	1394	1394
query40	207	113	101	101
query41	53	50	51	50
query42	116	102	105	102
query43	499	509	488	488
query44	1276	796	786	786
query45	174	170	164	164
query46	826	1025	615	615
query47	1783	1807	1710	1710
query48	386	428	303	303
query49	791	506	426	426
query50	688	740	418	418
query51	4223	4172	4166	4166
query52	110	104	100	100
query53	231	262	190	190
query54	497	500	406	406
query55	81	81	80	80
query56	287	264	280	264
query57	1112	1158	1094	1094
query58	246	230	241	230
query59	2558	2847	2600	2600
query60	299	281	250	250
query61	124	124	118	118
query62	816	740	666	666
query63	230	190	191	190
query64	4332	1021	672	672
query65	4418	4334	4394	4334
query66	1097	415	336	336
query67	15839	15266	15289	15266
query68	7945	864	508	508
query69	486	308	259	259
query70	1231	1138	1072	1072
query71	415	292	262	262
query72	5565	3556	3718	3556
query73	717	711	363	363
query74	9110	9414	8869	8869
query75	3387	3195	2695	2695
query76	3312	1175	746	746
query77	770	415	283	283
query78	10080	10019	9362	9362
query79	2327	840	598	598
query80	614	519	446	446
query81	501	257	229	229
query82	508	127	91	91
query83	173	171	156	156
query84	241	96	77	77
query85	800	367	314	314
query86	378	302	293	293
query87	4472	4475	4302	4302
query88	4073	2259	2258	2258
query89	396	320	288	288
query90	1939	215	217	215
query91	144	139	110	110
query92	73	60	57	57
query93	1867	1072	582	582
query94	707	444	298	298
query95	363	273	263	263
query96	494	568	277	277
query97	3334	3418	3334	3334
query98	234	200	212	200
query99	1334	1425	1278	1278
Total cold run time: 274237 ms
Total hot run time: 185736 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.04
query2	0.07	0.03	0.03
query3	0.23	0.06	0.06
query4	1.63	0.10	0.11
query5	0.59	0.56	0.55
query6	1.17	0.71	0.71
query7	0.02	0.02	0.02
query8	0.04	0.03	0.03
query9	0.59	0.53	0.52
query10	0.57	0.61	0.57
query11	0.16	0.11	0.11
query12	0.14	0.11	0.11
query13	0.64	0.61	0.60
query14	2.69	2.68	2.71
query15	0.93	0.86	0.85
query16	0.41	0.39	0.38
query17	1.03	1.04	1.05
query18	0.21	0.20	0.20
query19	2.01	1.98	1.80
query20	0.01	0.01	0.01
query21	15.35	0.93	0.56
query22	0.77	1.19	0.66
query23	14.94	1.39	0.62
query24	6.88	1.78	0.76
query25	0.48	0.09	0.18
query26	0.67	0.16	0.13
query27	0.05	0.06	0.05
query28	9.00	0.86	0.44
query29	12.57	4.02	3.31
query30	0.24	0.09	0.06
query31	2.83	0.59	0.40
query32	3.26	0.56	0.47
query33	2.97	2.98	3.04
query34	15.68	5.17	4.51
query35	4.57	4.55	4.59
query36	0.66	0.48	0.48
query37	0.08	0.06	0.06
query38	0.06	0.04	0.04
query39	0.03	0.02	0.03
query40	0.16	0.14	0.13
query41	0.08	0.02	0.02
query42	0.03	0.02	0.02
query43	0.04	0.04	0.03
Total cold run time: 104.57 s
Total hot run time: 30.79 s

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 0.00% (0/29) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 46.83% (12519/26733)
Line Coverage 36.45% (106699/292754)
Region Coverage 35.48% (54520/153646)
Branch Coverage 30.86% (27429/88868)

宋光璠 added 2 commits March 10, 2025 19:18
@Tech-Circle-48
Copy link
Contributor Author

run buildall

宋光璠 added 2 commits March 10, 2025 19:33
@Tech-Circle-48
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17644	5312	5148	5148
q2	2044	292	162	162
q3	10422	1324	698	698
q4	10222	1001	536	536
q5	7521	2420	2319	2319
q6	192	164	133	133
q7	912	745	595	595
q8	9309	1258	1183	1183
q9	4971	4821	4880	4821
q10	6845	2304	1890	1890
q11	474	283	258	258
q12	356	362	229	229
q13	17778	3720	3113	3113
q14	233	225	212	212
q15	523	486	471	471
q16	625	616	569	569
q17	557	864	337	337
q18	6998	6368	6385	6368
q19	1203	929	571	571
q20	333	328	204	204
q21	2942	2189	1943	1943
q22	1078	1019	992	992
Total cold run time: 103182 ms
Total hot run time: 32752 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5273	5220	5208	5208
q2	245	326	232	232
q3	2164	2673	2315	2315
q4	1471	1825	1361	1361
q5	4261	4129	4160	4129
q6	203	160	123	123
q7	1852	1996	1770	1770
q8	2631	2691	2598	2598
q9	7203	7205	7089	7089
q10	2980	3220	2761	2761
q11	573	509	495	495
q12	699	753	613	613
q13	3521	3979	3294	3294
q14	282	315	271	271
q15	517	485	483	483
q16	655	704	644	644
q17	1157	1620	1353	1353
q18	7740	7636	7554	7554
q19	898	885	1056	885
q20	1923	2065	1900	1900
q21	5465	5000	4987	4987
q22	1068	1027	997	997
Total cold run time: 52781 ms
Total hot run time: 51062 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 186036 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 9895c431a8a55d9f0c9edf120705e65b2de79734, data reload: false

query1	1022	387	400	387
query2	6561	1927	1957	1927
query3	6790	215	221	215
query4	26425	23496	23570	23496
query5	4699	672	512	512
query6	318	201	188	188
query7	4604	498	317	317
query8	295	244	234	234
query9	8624	2661	2661	2661
query10	468	307	256	256
query11	15884	15242	14897	14897
query12	168	110	106	106
query13	1651	519	406	406
query14	11225	6884	6589	6589
query15	261	204	170	170
query16	7555	637	431	431
query17	1564	735	560	560
query18	1907	402	319	319
query19	238	192	160	160
query20	121	120	118	118
query21	271	119	103	103
query22	4272	4216	4203	4203
query23	33885	32838	32816	32816
query24	6972	2401	2441	2401
query25	531	443	387	387
query26	1221	272	152	152
query27	1995	480	329	329
query28	3906	2424	2433	2424
query29	666	562	431	431
query30	282	215	190	190
query31	956	882	812	812
query32	74	65	64	64
query33	550	354	307	307
query34	800	838	501	501
query35	810	818	738	738
query36	962	995	899	899
query37	132	133	78	78
query38	4173	4119	4142	4119
query39	1452	1386	1387	1386
query40	201	120	102	102
query41	54	60	61	60
query42	119	106	103	103
query43	523	520	480	480
query44	1344	808	800	800
query45	181	172	166	166
query46	872	999	632	632
query47	1733	1776	1700	1700
query48	382	414	302	302
query49	785	550	436	436
query50	726	736	408	408
query51	4233	4139	4154	4139
query52	104	112	95	95
query53	243	270	188	188
query54	499	491	418	418
query55	82	80	86	80
query56	268	272	262	262
query57	1120	1135	1068	1068
query58	248	237	240	237
query59	2816	2704	2614	2614
query60	282	270	281	270
query61	121	120	117	117
query62	797	740	662	662
query63	233	194	189	189
query64	4202	1057	670	670
query65	4451	4327	4363	4327
query66	1046	402	300	300
query67	15756	16010	15443	15443
query68	7798	895	510	510
query69	464	294	268	268
query70	1226	1157	1087	1087
query71	461	290	272	272
query72	5617	3695	3818	3695
query73	818	741	355	355
query74	8935	9187	8678	8678
query75	3876	3135	2696	2696
query76	3690	1255	756	756
query77	809	389	292	292
query78	10022	10230	9332	9332
query79	3133	834	583	583
query80	598	509	437	437
query81	482	261	229	229
query82	726	124	93	93
query83	177	167	154	154
query84	239	92	75	75
query85	779	430	313	313
query86	383	311	292	292
query87	4561	4748	4356	4356
query88	3635	2208	2220	2208
query89	397	310	287	287
query90	1839	208	211	208
query91	136	137	106	106
query92	76	60	59	59
query93	1816	1048	582	582
query94	671	399	304	304
query95	357	262	261	261
query96	481	555	277	277
query97	3344	3365	3293	3293
query98	228	208	199	199
query99	1328	1408	1222	1222
Total cold run time: 276813 ms
Total hot run time: 186036 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.07	0.04	0.04
query3	0.23	0.07	0.06
query4	1.62	0.10	0.11
query5	0.56	0.55	0.55
query6	1.18	0.71	0.71
query7	0.02	0.02	0.02
query8	0.04	0.04	0.03
query9	0.58	0.54	0.52
query10	0.57	0.61	0.58
query11	0.16	0.11	0.10
query12	0.14	0.11	0.11
query13	0.62	0.61	0.60
query14	2.70	2.67	2.69
query15	0.92	0.86	0.84
query16	0.39	0.38	0.38
query17	1.01	1.02	1.07
query18	0.22	0.20	0.19
query19	1.91	1.96	1.86
query20	0.02	0.01	0.01
query21	15.35	0.87	0.55
query22	0.78	1.13	0.69
query23	14.96	1.37	0.62
query24	7.76	0.89	1.07
query25	0.52	0.19	0.12
query26	0.68	0.16	0.13
query27	0.06	0.07	0.04
query28	9.48	0.82	0.43
query29	12.57	4.02	3.32
query30	0.25	0.09	0.07
query31	2.82	0.58	0.38
query32	3.25	0.55	0.46
query33	2.94	2.97	3.05
query34	15.82	5.14	4.56
query35	4.53	4.55	4.50
query36	0.66	0.49	0.48
query37	0.09	0.06	0.06
query38	0.05	0.03	0.03
query39	0.03	0.02	0.02
query40	0.18	0.14	0.13
query41	0.08	0.02	0.02
query42	0.04	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 105.92 s
Total hot run time: 30.94 s

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 0.00% (0/42) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 46.83% (12519/26733)
Line Coverage 36.44% (106688/292778)
Region Coverage 35.47% (54510/153662)
Branch Coverage 30.85% (27424/88882)

宋光璠 added 2 commits March 11, 2025 15:58
@Tech-Circle-48
Copy link
Contributor Author

run buildall

for (auto&& node_info : slave_tablet_nodes.slave_nodes()) {
_request_slave_tablet_pull_rowset(node_info);
Status status = _request_slave_tablet_pull_rowset(node_info);
Copy link
Contributor

Choose a reason for hiding this comment

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

RETURN_IF_ERROR(_request_slave_tablet_pull_rowset(node_info))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thx

@@ -231,7 +239,26 @@ int64_t BaseDeltaWriter::mem_consumption(MemType mem) {
return _memtable_writer->mem_consumption(mem);
}

void DeltaWriter::_request_slave_tablet_pull_rowset(const PNodeInfo& node_info) {
Status safe_get_file_size(const std::string& file_path, int64_t* file_size) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you simplify it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

already simplify

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17608	5342	5119	5119
q2	2049	299	170	170
q3	10412	1389	744	744
q4	10211	1033	568	568
q5	7490	2455	2371	2371
q6	192	160	132	132
q7	927	773	615	615
q8	9307	1302	1158	1158
q9	4931	4774	4903	4774
q10	6838	2311	1911	1911
q11	493	285	283	283
q12	363	371	223	223
q13	17771	3880	3158	3158
q14	234	243	209	209
q15	541	484	485	484
q16	632	633	593	593
q17	588	890	352	352
q18	7222	6549	6335	6335
q19	1089	958	590	590
q20	353	353	210	210
q21	3027	2316	1981	1981
q22	1026	1005	1003	1003
Total cold run time: 103304 ms
Total hot run time: 32983 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5204	5131	5210	5131
q2	250	327	221	221
q3	2199	2717	2317	2317
q4	1534	1841	1448	1448
q5	4237	4158	4138	4138
q6	208	160	125	125
q7	2028	1963	1778	1778
q8	2660	2599	2588	2588
q9	7254	7109	7183	7109
q10	2962	3238	2744	2744
q11	566	512	486	486
q12	696	821	650	650
q13	3576	3933	3182	3182
q14	285	286	275	275
q15	515	483	465	465
q16	652	692	656	656
q17	1159	1595	1365	1365
q18	7914	7495	7385	7385
q19	872	853	896	853
q20	1986	1998	1886	1886
q21	5625	4943	4778	4778
q22	1090	1053	991	991
Total cold run time: 53472 ms
Total hot run time: 50571 ms

@doris-robot
Copy link

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

query1	998	419	384	384
query2	6532	2028	1998	1998
query3	6791	233	226	226
query4	26225	23658	23137	23137
query5	4451	670	500	500
query6	297	205	191	191
query7	4611	519	305	305
query8	303	242	246	242
query9	8669	2650	2662	2650
query10	440	312	265	265
query11	15968	15144	14875	14875
query12	178	109	108	108
query13	1658	540	420	420
query14	10820	6638	6922	6638
query15	213	199	178	178
query16	7715	654	480	480
query17	1636	782	584	584
query18	2004	401	318	318
query19	221	195	166	166
query20	127	122	114	114
query21	212	140	107	107
query22	4146	4374	4088	4088
query23	33913	32839	32842	32839
query24	7209	2409	2385	2385
query25	519	503	387	387
query26	1219	285	156	156
query27	2124	489	331	331
query28	4008	2416	2399	2399
query29	719	567	425	425
query30	287	226	193	193
query31	989	897	784	784
query32	73	69	64	64
query33	557	379	292	292
query34	803	859	520	520
query35	790	833	741	741
query36	957	995	902	902
query37	120	130	74	74
query38	4160	4281	4346	4281
query39	1426	1410	1394	1394
query40	211	117	104	104
query41	55	57	50	50
query42	118	104	109	104
query43	511	524	514	514
query44	1346	802	793	793
query45	182	174	165	165
query46	889	1036	644	644
query47	1737	1771	1709	1709
query48	367	424	309	309
query49	776	509	421	421
query50	726	739	423	423
query51	4264	4210	4164	4164
query52	109	107	101	101
query53	234	278	208	208
query54	495	506	417	417
query55	86	84	78	78
query56	273	283	266	266
query57	1099	1157	1055	1055
query58	259	247	241	241
query59	2588	2848	2660	2660
query60	297	287	256	256
query61	141	121	121	121
query62	801	711	670	670
query63	232	203	199	199
query64	4261	1020	673	673
query65	4507	4356	4398	4356
query66	1059	421	296	296
query67	15753	15509	15086	15086
query68	8365	892	522	522
query69	469	342	274	274
query70	1263	1133	1125	1125
query71	462	301	276	276
query72	5651	3633	3604	3604
query73	798	768	361	361
query74	9330	9138	8990	8990
query75	3854	3177	2693	2693
query76	3682	1192	763	763
query77	767	400	282	282
query78	10027	10131	9294	9294
query79	3028	842	586	586
query80	624	541	458	458
query81	488	264	222	222
query82	688	131	95	95
query83	173	176	165	165
query84	242	95	78	78
query85	766	364	312	312
query86	389	275	316	275
query87	4431	4503	4521	4503
query88	3661	2317	2280	2280
query89	397	331	291	291
query90	1861	209	213	209
query91	151	138	110	110
query92	78	59	53	53
query93	1723	1105	583	583
query94	668	397	318	318
query95	368	268	264	264
query96	490	564	283	283
query97	3326	3348	3285	3285
query98	262	201	216	201
query99	1640	1382	1276	1276
Total cold run time: 277586 ms
Total hot run time: 186255 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.07	0.04	0.03
query3	0.24	0.06	0.06
query4	1.62	0.10	0.10
query5	0.55	0.56	0.54
query6	1.16	0.72	0.72
query7	0.02	0.01	0.01
query8	0.04	0.03	0.04
query9	0.59	0.54	0.51
query10	0.57	0.64	0.58
query11	0.15	0.11	0.11
query12	0.15	0.12	0.11
query13	0.61	0.61	0.60
query14	2.68	2.70	2.73
query15	0.94	0.86	0.84
query16	0.39	0.36	0.39
query17	1.03	1.03	1.02
query18	0.21	0.20	0.20
query19	1.90	2.03	1.80
query20	0.02	0.01	0.01
query21	15.35	0.89	0.54
query22	0.75	1.12	0.59
query23	15.08	1.39	0.61
query24	6.67	2.41	0.72
query25	0.53	0.25	0.24
query26	0.58	0.15	0.13
query27	0.06	0.05	0.05
query28	9.87	0.83	0.42
query29	12.61	3.99	3.25
query30	0.26	0.09	0.06
query31	2.81	0.61	0.39
query32	3.23	0.56	0.46
query33	2.93	3.09	3.06
query34	15.65	5.17	4.54
query35	4.55	4.55	4.54
query36	0.67	0.49	0.48
query37	0.08	0.06	0.07
query38	0.06	0.04	0.04
query39	0.02	0.02	0.03
query40	0.16	0.13	0.13
query41	0.08	0.02	0.03
query42	0.04	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 105.05 s
Total hot run time: 30.76 s

@@ -144,7 +144,9 @@ class DeltaWriter final : public BaseDeltaWriter {
private:
void _init_profile(RuntimeProfile* profile) override;

void _request_slave_tablet_pull_rowset(const PNodeInfo& node_info);
int64_t safe_get_filesize(const std::string& file_path);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
int64_t safe_get_filesize(const std::string& file_path);
int64_t _safe_get_filesize(const std::string& file_path);

void DeltaWriter::_request_slave_tablet_pull_rowset(const PNodeInfo& node_info) {
Status safe_get_file_size(const std::string& file_path, int64_t* file_size) {
if (file_size == nullptr) {
return Status::InvalidArgument("Null output parameter in safe_get_file_size");
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can just use CHECK(file_size != nullptr) << "Null output parameter in safe_get_file_size"

宋光璠 added 2 commits March 14, 2025 09:28
@Tech-Circle-48
Copy link
Contributor Author

run buildall

morningman
morningman previously approved these changes Mar 14, 2025
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Mar 14, 2025
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.

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Mar 14, 2025
morningman
morningman previously approved these changes Mar 14, 2025
@morningman
Copy link
Contributor

run buildall

Copy link
Contributor

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 Mar 14, 2025
CHECK(file_size != nullptr) << "Null output parameter in safe_get_file_size";

try {
if (!std::filesystem::exists(file_path)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no need to check if the file exists. If the file does not exist, the file_size function will throw an exception.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the issue has been fixed

@@ -281,7 +299,9 @@ void DeltaWriter::_request_slave_tablet_pull_rowset(const PNodeInfo& node_info)
for (int segment_id = 0; segment_id < cur_rowset->rowset_meta()->num_segments(); segment_id++) {
auto seg_path =
local_segment_path(tablet_path, cur_rowset->rowset_id().to_string(), segment_id);
int64_t segment_size = std::filesystem::file_size(seg_path);
int64_t segment_size = 0;
RETURN_IF_ERROR(safe_get_file_size(seg_path, &segment_size));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
RETURN_IF_ERROR(safe_get_file_size(seg_path, &segment_size));
RETURN_IF_ERROR(_safe_get_file_size(seg_path, &segment_size));

compile error.

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Mar 17, 2025
@morningman
Copy link
Contributor

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	24150	5089	5015	5015
q2	2062	297	204	204
q3	10351	1255	683	683
q4	10215	1002	572	572
q5	7526	2326	2344	2326
q6	191	169	140	140
q7	912	747	612	612
q8	9321	1288	1112	1112
q9	4846	4839	4906	4839
q10	6822	2326	1889	1889
q11	484	273	257	257
q12	351	353	221	221
q13	17789	3677	3092	3092
q14	243	239	220	220
q15	530	468	472	468
q16	617	613	590	590
q17	579	856	349	349
q18	6891	6486	6317	6317
q19	1221	960	565	565
q20	338	337	216	216
q21	3218	2290	1971	1971
q22	1047	1081	987	987
Total cold run time: 109704 ms
Total hot run time: 32645 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5131	5092	5116	5092
q2	240	328	235	235
q3	2183	2694	2342	2342
q4	1449	1881	1380	1380
q5	4305	4208	4461	4208
q6	215	168	131	131
q7	1997	1983	1807	1807
q8	2597	2634	2483	2483
q9	7260	7253	7204	7204
q10	2996	3189	2661	2661
q11	571	524	512	512
q12	663	798	626	626
q13	3493	3860	3334	3334
q14	295	306	266	266
q15	523	466	473	466
q16	624	695	650	650
q17	1140	1614	1313	1313
q18	7774	7737	7470	7470
q19	836	841	877	841
q20	1964	2039	1919	1919
q21	5315	4944	4846	4846
q22	1114	1038	1021	1021
Total cold run time: 52685 ms
Total hot run time: 50807 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 192548 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 0337dd5735d7b17e406da0e91a287c7f7cb1b991, data reload: false

query1	1396	1063	1036	1036
query2	6094	1965	1939	1939
query3	11069	4606	4600	4600
query4	56027	25729	23076	23076
query5	5029	581	485	485
query6	349	197	183	183
query7	4906	503	288	288
query8	311	248	233	233
query9	5778	2594	2603	2594
query10	415	301	246	246
query11	15093	15328	15010	15010
query12	166	112	107	107
query13	1068	491	383	383
query14	10347	6844	6879	6844
query15	214	201	187	187
query16	7084	656	516	516
query17	1103	768	578	578
query18	1550	441	333	333
query19	203	202	181	181
query20	134	128	118	118
query21	211	132	112	112
query22	4318	4448	4357	4357
query23	33966	33411	33275	33275
query24	5957	2445	2486	2445
query25	475	464	434	434
query26	678	276	158	158
query27	1897	504	331	331
query28	2883	2462	2450	2450
query29	566	578	420	420
query30	272	222	189	189
query31	877	863	783	783
query32	67	63	58	58
query33	465	389	295	295
query34	762	838	510	510
query35	816	845	728	728
query36	974	1003	907	907
query37	135	105	75	75
query38	4247	4264	4146	4146
query39	1499	1597	1420	1420
query40	203	119	105	105
query41	54	51	49	49
query42	129	109	101	101
query43	499	519	497	497
query44	1330	813	809	809
query45	181	172	164	164
query46	844	1052	651	651
query47	1823	1880	1857	1857
query48	385	424	325	325
query49	722	521	424	424
query50	714	775	439	439
query51	4224	4336	4279	4279
query52	110	108	99	99
query53	235	264	197	197
query54	494	521	422	422
query55	92	84	85	84
query56	300	261	272	261
query57	1160	1204	1103	1103
query58	252	254	250	250
query59	2843	2946	2825	2825
query60	290	273	262	262
query61	120	118	117	117
query62	744	729	673	673
query63	226	216	189	189
query64	1517	1024	704	704
query65	4633	4508	4382	4382
query66	708	394	302	302
query67	15788	15640	15424	15424
query68	7426	814	500	500
query69	546	316	251	251
query70	1227	1112	1107	1107
query71	540	291	270	270
query72	5537	3610	3759	3610
query73	1445	741	345	345
query74	9039	9059	8745	8745
query75	3795	3186	2714	2714
query76	4254	1176	749	749
query77	666	364	282	282
query78	10119	10051	9232	9232
query79	2720	838	593	593
query80	694	517	448	448
query81	485	265	220	220
query82	680	125	95	95
query83	275	174	150	150
query84	287	89	75	75
query85	775	342	309	309
query86	388	288	304	288
query87	4422	4508	4389	4389
query88	3592	2290	2224	2224
query89	422	310	289	289
query90	1844	211	204	204
query91	139	141	107	107
query92	71	58	58	58
query93	1990	1051	574	574
query94	669	405	287	287
query95	344	271	259	259
query96	487	556	351	351
query97	3333	3469	3325	3325
query98	233	207	217	207
query99	1468	1415	1267	1267
Total cold run time: 299933 ms
Total hot run time: 192548 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.12	0.11	0.10
query3	0.26	0.20	0.19
query4	1.59	0.19	0.20
query5	0.58	0.58	0.57
query6	1.16	0.71	0.72
query7	0.02	0.02	0.02
query8	0.04	0.03	0.03
query9	0.58	0.51	0.51
query10	0.58	0.59	0.57
query11	0.15	0.11	0.10
query12	0.16	0.12	0.12
query13	0.61	0.60	0.60
query14	2.67	2.69	2.82
query15	0.94	0.85	0.85
query16	0.38	0.36	0.38
query17	1.01	1.05	1.03
query18	0.21	0.20	0.20
query19	1.86	1.96	1.84
query20	0.01	0.01	0.01
query21	15.35	0.87	0.55
query22	0.76	1.21	0.77
query23	14.75	1.40	0.62
query24	7.13	1.16	0.45
query25	0.47	0.27	0.09
query26	0.50	0.15	0.14
query27	0.05	0.05	0.06
query28	10.29	0.94	0.43
query29	12.53	3.94	3.29
query30	0.26	0.09	0.06
query31	2.83	0.61	0.39
query32	3.23	0.55	0.46
query33	3.00	2.98	3.08
query34	15.89	5.06	4.49
query35	4.50	4.55	4.52
query36	0.69	0.48	0.48
query37	0.09	0.06	0.06
query38	0.05	0.04	0.04
query39	0.03	0.02	0.02
query40	0.17	0.14	0.13
query41	0.09	0.03	0.03
query42	0.03	0.02	0.02
query43	0.04	0.03	0.03
Total cold run time: 105.7 s
Total hot run time: 30.82 s

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 0.00% (0/24) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 48.79% (13066/26782)
Line Coverage 38.37% (112690/293684)
Region Coverage 37.16% (57280/154142)
Branch Coverage 32.27% (28793/89236)

Copy link
Contributor

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 Mar 29, 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. reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants