Skip to content

Conversation

@liaoxin01
Copy link
Contributor

@liaoxin01 liaoxin01 commented Sep 6, 2025

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #54395

Problem Summary:

During schema change, new tablet may have some later version empty rowsets without resource_id, but middle rowsets get resource_id after historical rowsets are converted. We need to iterate backwards to find a rowset with non-empty resource_id.

02:59:22 *** SIGABRT unknown detail explain (@0x3fba19) received by PID 4176409 (TID 4176919 OR 0x7bf108742700) from PID 4176409; stack trace: ***
02:59:22 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420
02:59:22 1# 0x00007FF4491FA420 in /lib/x86_64-linux-gnu/libpthread.so.0
02:59:22 2# raise at ../sysdeps/unix/sysv/linux/raise.c:51
02:59:22 3# abort at /build/glibc-SzIz7B/glibc-2.31/stdlib/abort.c:81
02:59:22 4# 0x000055907358D285 in /home/work/unlimit_teamcity/TeamCity/Agents/20250903194337agent_172.16.0.6_1/work/60183217f6ee2a9c/output/be/lib/doris_be
02:59:22 5# 0x000055907357EB3A in /home/work/unlimit_teamcity/TeamCity/Agents/20250903194337agent_172.16.0.6_1/work/60183217f6ee2a9c/output/be/lib/doris_be
02:59:22 6# google::LogMessage::SendToLog() in /home/work/unlimit_teamcity/TeamCity/Agents/20250903194337agent_172.16.0.6_1/work/60183217f6ee2a9c/output/be/lib/doris_be
02:59:22 7# google::LogMessage::Flush() in /home/work/unlimit_teamcity/TeamCity/Agents/20250903194337agent_172.16.0.6_1/work/60183217f6ee2a9c/output/be/lib/doris_be
02:59:22 8# google::LogMessageFatal::~LogMessageFatal() in /home/work/unlimit_teamcity/TeamCity/Agents/20250903194337agent_172.16.0.6_1/work/60183217f6ee2a9c/output/be/lib/doris_be
02:59:22 9# doris::cloud::CloudMetaMgr::check_table_size_correctness(doris::RowsetMeta const&) at /root/doris/be/src/cloud/cloud_meta_mgr.cpp:1862
02:59:22 10# doris::cloud::CloudMetaMgr::commit_rowset(doris::RowsetMeta&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::shared_ptrdoris::RowsetMeta*) in /home/work/unlimit_teamcity/TeamCity/Agents/20250903194337agent_172.16.0.6_1/work/60183217f6ee2a9c/output/be/lib/doris_be
02:59:22 11# doris::CloudCompactionMixin::execute_compact_impl(long) at /root/doris/be/src/olap/compaction.cpp:1500
02:59:22 12# doris::CloudCompactionMixin::execute_compact() at /root/doris/be/src/olap/compaction.cpp:1521
02:59:22 13# doris::CloudCumulativeCompaction::execute_compact() at /root/doris/be/src/cloud/cloud_cumulative_compaction.cpp:203
02:59:22 14# std::_Function_handler<void (), doris::CloudStorageEngine::_submit_cumulative_compaction_task(std::shared_ptrdoris::CloudTablet

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

… when enable skip_writing_empty_rowset_metadata
@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?

@liaoxin01
Copy link
Contributor Author

run buildall

Copy link
Contributor

@dataroaring dataroaring left a comment

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 Sep 6, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2025

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

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2025

PR approved by anyone and no changes requested.

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17612	5215	5080	5080
q2	2018	318	207	207
q3	10281	1304	741	741
q4	10226	1031	521	521
q5	7575	2396	2373	2373
q6	183	165	134	134
q7	935	758	623	623
q8	9343	1330	1125	1125
q9	6833	5157	5098	5098
q10	6941	2373	1988	1988
q11	490	294	301	294
q12	363	358	223	223
q13	17786	3647	3016	3016
q14	246	258	213	213
q15	572	507	478	478
q16	1000	996	955	955
q17	615	869	371	371
q18	7395	7079	7021	7021
q19	1388	962	576	576
q20	340	339	232	232
q21	3806	2549	2997	2549
q22	1071	1044	976	976
Total cold run time: 107019 ms
Total hot run time: 34794 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5199	5068	5084	5068
q2	256	331	229	229
q3	2172	2660	2282	2282
q4	1349	1783	1344	1344
q5	4222	4602	4541	4541
q6	221	174	128	128
q7	2073	1984	1781	1781
q8	2726	2680	2505	2505
q9	7363	7392	7403	7392
q10	3174	3267	2933	2933
q11	559	517	512	512
q12	694	780	654	654
q13	3549	3936	3384	3384
q14	276	302	284	284
q15	527	486	487	486
q16	1112	1095	1065	1065
q17	1224	1658	1412	1412
q18	8020	7680	7495	7495
q19	803	771	774	771
q20	1957	2023	1795	1795
q21	4753	4354	4272	4272
q22	1091	1053	1013	1013
Total cold run time: 53320 ms
Total hot run time: 51346 ms

@doris-robot
Copy link

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

query1	1029	440	415	415
query2	6580	1701	1675	1675
query3	6758	225	228	225
query4	25902	23447	22951	22951
query5	4456	662	538	538
query6	384	254	247	247
query7	4660	519	316	316
query8	316	273	250	250
query9	8661	2922	2905	2905
query10	481	330	302	302
query11	15604	15158	14778	14778
query12	177	117	116	116
query13	1674	549	439	439
query14	11154	9242	9125	9125
query15	246	199	169	169
query16	7667	635	470	470
query17	1214	753	643	643
query18	2082	425	349	349
query19	208	202	178	178
query20	129	134	130	130
query21	219	134	114	114
query22	4071	4311	4038	4038
query23	33893	33043	33012	33012
query24	8029	2364	2421	2364
query25	580	537	450	450
query26	1242	318	170	170
query27	2699	514	358	358
query28	4425	2240	2231	2231
query29	803	643	521	521
query30	290	227	195	195
query31	939	789	701	701
query32	88	82	80	80
query33	617	400	358	358
query34	816	874	517	517
query35	822	852	777	777
query36	954	1039	943	943
query37	124	115	92	92
query38	3530	3533	3471	3471
query39	1687	1454	1412	1412
query40	223	136	127	127
query41	66	61	61	61
query42	127	111	132	111
query43	523	495	485	485
query44	1363	889	869	869
query45	191	178	183	178
query46	853	1013	657	657
query47	1797	1817	1725	1725
query48	408	433	334	334
query49	755	518	405	405
query50	635	704	415	415
query51	3983	3905	3902	3902
query52	116	150	105	105
query53	249	275	202	202
query54	615	619	551	551
query55	102	91	93	91
query56	350	343	317	317
query57	1189	1184	1128	1128
query58	296	290	283	283
query59	2599	2669	2479	2479
query60	361	357	356	356
query61	167	162	163	162
query62	810	732	678	678
query63	229	201	199	199
query64	4467	1260	856	856
query65	4043	3968	3977	3968
query66	1111	440	352	352
query67	15741	15488	15080	15080
query68	6405	934	594	594
query69	486	329	287	287
query70	1376	1364	1222	1222
query71	550	363	336	336
query72	6000	5086	5134	5086
query73	697	665	367	367
query74	8945	9091	8810	8810
query75	3319	3232	2790	2790
query76	3220	1173	768	768
query77	508	399	346	346
query78	9603	9950	8853	8853
query79	1028	852	593	593
query80	738	599	527	527
query81	489	258	229	229
query82	417	166	140	140
query83	267	264	251	251
query84	260	114	96	96
query85	857	474	435	435
query86	345	303	278	278
query87	3767	3704	3666	3666
query88	2876	2220	2232	2220
query89	400	334	298	298
query90	1736	219	229	219
query91	164	169	134	134
query92	79	78	73	73
query93	1114	1000	640	640
query94	692	429	334	334
query95	418	357	346	346
query96	488	598	291	291
query97	2900	3053	2879	2879
query98	246	216	218	216
query99	1327	1379	1288	1288
Total cold run time: 270296 ms
Total hot run time: 188713 ms

@doris-robot
Copy link

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

query1	0.06	0.05	0.05
query2	0.09	0.06	0.06
query3	0.25	0.08	0.08
query4	1.60	0.12	0.11
query5	0.28	0.27	0.25
query6	1.20	0.66	0.65
query7	0.04	0.03	0.03
query8	0.05	0.04	0.05
query9	0.62	0.53	0.53
query10	0.58	0.56	0.58
query11	0.17	0.12	0.11
query12	0.15	0.12	0.13
query13	0.63	0.63	0.63
query14	1.03	1.04	1.05
query15	0.87	0.85	0.87
query16	0.41	0.41	0.40
query17	1.06	1.05	1.06
query18	0.22	0.20	0.20
query19	1.92	1.82	1.77
query20	0.01	0.02	0.02
query21	15.41	0.94	0.59
query22	0.75	1.22	0.64
query23	14.94	1.40	0.63
query24	6.54	2.11	0.37
query25	0.36	0.11	0.10
query26	0.64	0.16	0.13
query27	0.06	0.06	0.06
query28	9.98	0.94	0.42
query29	12.55	3.92	3.23
query30	0.28	0.14	0.11
query31	2.84	0.59	0.38
query32	3.23	0.57	0.48
query33	3.14	3.10	3.13
query34	16.27	5.43	4.89
query35	4.94	4.92	4.88
query36	0.70	0.52	0.50
query37	0.10	0.07	0.07
query38	0.06	0.05	0.05
query39	0.04	0.03	0.03
query40	0.19	0.15	0.15
query41	0.09	0.03	0.03
query42	0.04	0.03	0.03
query43	0.05	0.04	0.03
Total cold run time: 104.44 s
Total hot run time: 29.45 s

@liaoxin01
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17628	5178	5055	5055
q2	1993	344	218	218
q3	10233	1293	703	703
q4	10234	1016	510	510
q5	7536	2409	2336	2336
q6	204	166	134	134
q7	911	768	645	645
q8	9334	1315	1110	1110
q9	6914	5098	5094	5094
q10	6943	2378	1991	1991
q11	503	303	289	289
q12	371	360	223	223
q13	17784	3660	3072	3072
q14	238	244	212	212
q15	578	505	499	499
q16	993	1001	958	958
q17	616	880	383	383
q18	7872	7326	7093	7093
q19	1429	951	559	559
q20	339	343	236	236
q21	3584	3130	2397	2397
q22	1025	1056	982	982
Total cold run time: 107262 ms
Total hot run time: 34699 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5252	5050	5097	5050
q2	249	334	238	238
q3	2157	2686	2288	2288
q4	1371	1786	1346	1346
q5	4175	4476	4647	4476
q6	222	172	135	135
q7	2041	1971	1873	1873
q8	2676	2584	2585	2584
q9	7375	7354	7342	7342
q10	3081	3357	2902	2902
q11	574	539	538	538
q12	678	782	620	620
q13	3553	3874	3353	3353
q14	298	296	293	293
q15	525	480	494	480
q16	1075	1093	1064	1064
q17	1189	1560	1352	1352
q18	8070	7594	7733	7594
q19	906	860	901	860
q20	2041	2041	1833	1833
q21	4696	4353	4306	4306
q22	1047	1061	1030	1030
Total cold run time: 53251 ms
Total hot run time: 51557 ms

@doris-robot
Copy link

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

query1	1063	459	420	420
query2	6550	1704	1659	1659
query3	6758	227	234	227
query4	26150	23335	23102	23102
query5	4407	669	544	544
query6	336	230	227	227
query7	4660	500	298	298
query8	294	257	253	253
query9	8629	2922	2863	2863
query10	506	353	290	290
query11	15703	15023	14753	14753
query12	174	117	118	117
query13	1690	553	417	417
query14	10799	9092	9123	9092
query15	213	197	172	172
query16	7348	660	535	535
query17	1218	737	627	627
query18	2013	429	334	334
query19	208	197	172	172
query20	135	124	122	122
query21	214	130	117	117
query22	4198	4214	4130	4130
query23	33843	32910	32891	32891
query24	8152	2365	2380	2365
query25	589	519	441	441
query26	1250	276	164	164
query27	2739	513	359	359
query28	4414	2220	2214	2214
query29	840	657	503	503
query30	297	230	196	196
query31	912	799	721	721
query32	93	88	85	85
query33	592	382	362	362
query34	790	874	526	526
query35	851	822	723	723
query36	946	1025	925	925
query37	127	112	138	112
query38	3559	3522	3574	3522
query39	1677	1438	1472	1438
query40	226	136	125	125
query41	64	63	61	61
query42	138	115	125	115
query43	534	494	464	464
query44	1349	898	878	878
query45	181	182	170	170
query46	851	1009	659	659
query47	1810	1830	1767	1767
query48	404	444	334	334
query49	750	506	402	402
query50	657	682	423	423
query51	3884	3952	3850	3850
query52	119	122	105	105
query53	248	265	195	195
query54	613	595	554	554
query55	101	93	95	93
query56	357	350	345	345
query57	1226	1206	1150	1150
query58	303	286	286	286
query59	2569	2697	2605	2605
query60	375	379	365	365
query61	196	188	193	188
query62	832	715	663	663
query63	232	197	200	197
query64	4647	1222	851	851
query65	4021	3964	4000	3964
query66	1193	441	353	353
query67	15325	15178	15017	15017
query68	8425	920	581	581
query69	490	334	299	299
query70	1388	1275	1253	1253
query71	571	344	311	311
query72	5718	5031	5141	5031
query73	789	683	359	359
query74	8927	8847	8996	8847
query75	3926	3292	2807	2807
query76	3674	1216	727	727
query77	805	400	344	344
query78	9473	9773	8928	8928
query79	1690	837	581	581
query80	681	588	524	524
query81	477	266	236	236
query82	251	169	137	137
query83	298	264	247	247
query84	303	126	96	96
query85	917	463	423	423
query86	347	312	298	298
query87	3795	3759	3664	3664
query88	2819	2213	2233	2213
query89	409	324	294	294
query90	2051	230	227	227
query91	179	168	134	134
query92	90	73	74	73
query93	1123	1006	654	654
query94	687	413	328	328
query95	406	342	326	326
query96	486	594	278	278
query97	2939	2983	2880	2880
query98	236	223	223	223
query99	1467	1416	1302	1302
Total cold run time: 273979 ms
Total hot run time: 188822 ms

@doris-robot
Copy link

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

query1	0.06	0.06	0.05
query2	0.10	0.05	0.06
query3	0.25	0.09	0.08
query4	1.61	0.12	0.11
query5	0.28	0.28	0.27
query6	1.16	0.66	0.66
query7	0.03	0.04	0.03
query8	0.06	0.04	0.04
query9	0.63	0.52	0.53
query10	0.59	0.59	0.59
query11	0.17	0.12	0.12
query12	0.16	0.12	0.12
query13	0.63	0.64	0.61
query14	1.03	1.03	1.06
query15	0.86	0.87	0.87
query16	0.40	0.41	0.40
query17	1.06	1.09	1.04
query18	0.21	0.20	0.19
query19	1.94	1.88	1.79
query20	0.01	0.01	0.01
query21	15.42	0.93	0.58
query22	0.80	1.05	0.73
query23	14.94	1.41	0.64
query24	6.80	0.89	1.05
query25	0.50	0.20	0.08
query26	0.66	0.17	0.13
query27	0.06	0.06	0.05
query28	9.92	0.90	0.42
query29	12.59	3.87	3.25
query30	0.28	0.14	0.11
query31	2.83	0.60	0.40
query32	3.25	0.55	0.46
query33	3.15	3.21	3.16
query34	15.89	5.46	4.90
query35	4.94	4.88	4.89
query36	0.69	0.52	0.50
query37	0.11	0.07	0.07
query38	0.07	0.05	0.05
query39	0.03	0.03	0.03
query40	0.18	0.16	0.15
query41	0.09	0.03	0.03
query42	0.04	0.02	0.02
query43	0.04	0.04	0.03
Total cold run time: 104.52 s
Total hot run time: 30.14 s

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 0.00% (0/19) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 51.88% (17248/33243)
Line Coverage 37.29% (157392/422092)
Region Coverage 31.92% (120115/376253)
Branch Coverage 33.30% (52721/158337)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 68.42% (13/19) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 70.68% (23073/32644)
Line Coverage 57.06% (240683/421817)
Region Coverage 52.36% (199849/381663)
Branch Coverage 54.02% (86019/159239)

2 similar comments
@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 68.42% (13/19) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 70.68% (23073/32644)
Line Coverage 57.06% (240683/421817)
Region Coverage 52.36% (199849/381663)
Branch Coverage 54.02% (86019/159239)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 68.42% (13/19) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 70.68% (23073/32644)
Line Coverage 57.06% (240683/421817)
Region Coverage 52.36% (199849/381663)
Branch Coverage 54.02% (86019/159239)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 68.42% (13/19) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 70.69% (23077/32644)
Line Coverage 57.08% (240772/421817)
Region Coverage 52.40% (200003/381663)
Branch Coverage 54.04% (86057/159239)

@dataroaring dataroaring merged commit 4215d30 into apache:master Sep 8, 2025
29 of 32 checks passed
liaoxin01 added a commit to liaoxin01/doris that referenced this pull request Sep 12, 2025
… when enable skip_writing_empty_rowset_metadata (apache#55742)

Issue Number: close #xxx

Related PR: apache#54395
@morrySnow morrySnow mentioned this pull request Sep 22, 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/3.1.1-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants