Skip to content

Conversation

@felixwluo
Copy link
Contributor

What problem does this PR solve?

Problem Summary:

  1. Problem background
    There is a critical bug in Doris's compaction: after input rowsets participate in compaction, their expiration time calculation incorrectly uses the rowset's creation time (creation_time), instead of the compaction completion time

  2. Scene
    for example:
    a. After compaction is completed, the rowset should be discarded after another tablet_rowset_stale_sweep_time_sec
    b. Due to the use of creation time calculation, rowset is immediately eliminated
    c. The executing query failed, error occurred : [E-230]fail to find path in version_graph. spec_version: 0-1789 versions are already compacted

  3. Cause
    a. In the current implementation, TimestampedVersion is created using rs->creation_time()
    b. Elimination judgment logic : rowset_creation_time <= (current_time - tablet_rowset_stale_sweep_time_sec)
    c. For earlier created rowsets, even if they have just participated in compaction, they will be immediately discarded due to their long creation time

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 Aug 27, 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?

@felixwluo
Copy link
Contributor Author

run buildall

@felixwluo felixwluo requested review from adonis0147 and platoneko and removed request for platoneko August 27, 2025 13:34
@hello-stephen
Copy link
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 83.63% (1430/1710)
Line Coverage 67.24% (25436/37827)
Region Coverage 68.37% (12687/18556)
Branch Coverage 58.09% (6717/11564)

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17198	5385	5244	5244
q2	2001	368	211	211
q3	10010	1303	746	746
q4	10229	1039	544	544
q5	7624	2449	2383	2383
q6	186	173	156	156
q7	945	770	633	633
q8	9353	1340	1170	1170
q9	7150	5204	5323	5204
q10	6986	2381	1984	1984
q11	484	315	299	299
q12	357	375	236	236
q13	17810	3687	3076	3076
q14	239	253	221	221
q15	582	496	499	496
q16	452	440	383	383
q17	602	900	375	375
q18	7763	7200	7131	7131
q19	1094	975	580	580
q20	350	364	232	232
q21	3969	3281	2442	2442
q22	1053	1037	998	998
Total cold run time: 106437 ms
Total hot run time: 34744 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5311	5401	5260	5260
q2	250	334	258	258
q3	2189	2754	2360	2360
q4	1355	1822	1350	1350
q5	4275	4688	4537	4537
q6	227	190	145	145
q7	2121	1965	1895	1895
q8	2694	2675	2684	2675
q9	7481	7415	7267	7267
q10	3195	3354	2890	2890
q11	612	533	499	499
q12	692	850	614	614
q13	3558	4120	3355	3355
q14	295	318	279	279
q15	514	499	481	481
q16	492	533	468	468
q17	1173	1616	1461	1461
q18	7830	7592	7582	7582
q19	897	817	901	817
q20	2010	2091	1895	1895
q21	5123	4671	4190	4190
q22	1066	1059	1006	1006
Total cold run time: 53360 ms
Total hot run time: 51284 ms

@doris-robot
Copy link

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

query1	1050	435	434	434
query2	6551	1835	1810	1810
query3	6768	245	227	227
query4	26124	23955	23314	23314
query5	4395	683	534	534
query6	349	254	239	239
query7	4658	527	313	313
query8	327	288	269	269
query9	8666	2963	2905	2905
query10	523	352	307	307
query11	15459	15076	14920	14920
query12	180	125	119	119
query13	1688	618	447	447
query14	9328	6010	5994	5994
query15	221	206	177	177
query16	7733	670	518	518
query17	1255	781	673	673
query18	2068	486	347	347
query19	203	197	175	175
query20	131	129	125	125
query21	220	128	109	109
query22	4153	4162	4051	4051
query23	33937	33073	32910	32910
query24	8199	2435	2473	2435
query25	571	529	438	438
query26	1234	288	173	173
query27	2691	514	365	365
query28	4310	2279	2252	2252
query29	771	614	499	499
query30	304	232	213	213
query31	908	851	734	734
query32	97	82	83	82
query33	597	408	374	374
query34	810	855	540	540
query35	825	835	753	753
query36	993	1044	952	952
query37	136	118	95	95
query38	4106	4161	4071	4071
query39	1482	1435	1416	1416
query40	233	141	138	138
query41	71	72	68	68
query42	128	125	119	119
query43	507	520	508	508
query44	1395	893	877	877
query45	191	186	183	183
query46	865	1033	668	668
query47	1809	1839	1735	1735
query48	398	443	335	335
query49	752	518	420	420
query50	676	695	429	429
query51	4139	4221	4113	4113
query52	120	119	106	106
query53	250	283	217	217
query54	655	636	558	558
query55	99	95	93	93
query56	346	358	333	333
query57	1194	1202	1108	1108
query58	300	291	286	286
query59	2680	2717	2631	2631
query60	388	354	354	354
query61	166	154	160	154
query62	846	774	687	687
query63	235	208	199	199
query64	4447	1137	873	873
query65	4306	4271	4251	4251
query66	1110	451	356	356
query67	15457	15302	15241	15241
query68	8717	934	594	594
query69	501	330	312	312
query70	1296	1193	1152	1152
query71	510	409	328	328
query72	5564	4966	4985	4966
query73	744	596	370	370
query74	9391	9109	8844	8844
query75	3977	3137	2663	2663
query76	3767	1164	794	794
query77	822	428	337	337
query78	9560	9794	8831	8831
query79	2263	849	602	602
query80	729	588	516	516
query81	488	264	226	226
query82	251	153	111	111
query83	297	323	247	247
query84	306	116	98	98
query85	844	450	430	430
query86	350	317	307	307
query87	4399	4295	4216	4216
query88	2809	2267	2255	2255
query89	422	328	294	294
query90	2100	232	239	232
query91	167	168	138	138
query92	94	74	70	70
query93	1664	997	639	639
query94	696	436	322	322
query95	422	342	332	332
query96	492	598	284	284
query97	2674	2692	2624	2624
query98	246	237	212	212
query99	1431	1446	1288	1288
Total cold run time: 275777 ms
Total hot run time: 187983 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.04
query2	0.09	0.06	0.06
query3	0.25	0.08	0.08
query4	1.61	0.12	0.11
query5	0.43	0.42	0.42
query6	1.17	0.65	0.67
query7	0.02	0.02	0.02
query8	0.05	0.05	0.05
query9	0.59	0.52	0.52
query10	0.57	0.58	0.58
query11	0.17	0.12	0.11
query12	0.16	0.12	0.12
query13	0.62	0.63	0.62
query14	0.79	0.85	0.84
query15	0.88	0.86	0.85
query16	0.39	0.39	0.40
query17	1.02	1.02	1.03
query18	0.22	0.20	0.20
query19	1.95	1.87	1.87
query20	0.01	0.01	0.02
query21	15.40	0.99	0.60
query22	0.76	1.20	0.75
query23	14.82	1.41	0.64
query24	6.99	1.00	0.28
query25	0.29	0.22	0.09
query26	0.72	0.14	0.13
query27	0.09	0.06	0.05
query28	9.62	0.93	0.44
query29	12.54	3.96	3.24
query30	3.14	3.03	3.00
query31	2.82	0.59	0.39
query32	3.24	0.56	0.47
query33	3.10	3.12	3.11
query34	15.98	5.49	4.90
query35	4.97	4.92	4.89
query36	0.69	0.52	0.50
query37	0.10	0.07	0.08
query38	0.06	0.05	0.05
query39	0.04	0.03	0.03
query40	0.18	0.16	0.15
query41	0.08	0.04	0.03
query42	0.04	0.03	0.03
query43	0.04	0.03	0.04
Total cold run time: 106.75 s
Total hot run time: 32.43 s

@felixwluo
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 83.63% (1430/1710)
Line Coverage 67.26% (25443/37827)
Region Coverage 68.34% (12682/18556)
Branch Coverage 58.15% (6724/11564)

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage `` 🎉
Increment coverage report
Complete coverage report

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17372	5296	5100	5100
q2	2000	323	216	216
q3	10094	1295	728	728
q4	10231	1003	545	545
q5	7613	2397	2411	2397
q6	184	171	137	137
q7	928	782	636	636
q8	9346	1350	1131	1131
q9	7065	5142	5122	5122
q10	6936	2378	1944	1944
q11	483	315	282	282
q12	356	368	231	231
q13	17779	3657	3003	3003
q14	235	256	216	216
q15	584	517	506	506
q16	453	437	398	398
q17	609	873	361	361
q18	7493	7044	7038	7038
q19	1095	962	560	560
q20	355	357	228	228
q21	3992	3273	2417	2417
q22	1069	1046	1002	1002
Total cold run time: 106272 ms
Total hot run time: 34198 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5163	5119	5183	5119
q2	256	358	229	229
q3	2168	2658	2319	2319
q4	1383	1824	1354	1354
q5	4205	4437	4539	4437
q6	232	174	138	138
q7	2065	1983	1866	1866
q8	2605	2567	2545	2545
q9	7496	7369	7350	7350
q10	3152	3358	2876	2876
q11	582	565	515	515
q12	666	771	686	686
q13	3646	3896	3309	3309
q14	303	315	296	296
q15	520	479	482	479
q16	454	549	440	440
q17	1211	1562	1400	1400
q18	8003	7664	7627	7627
q19	846	828	933	828
q20	1989	2030	1900	1900
q21	4846	4322	4319	4319
q22	1058	1018	1008	1008
Total cold run time: 52849 ms
Total hot run time: 51040 ms

@doris-robot
Copy link

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

query1	1060	480	419	419
query2	6607	1743	1735	1735
query3	6751	236	228	228
query4	26001	23403	23194	23194
query5	4396	643	522	522
query6	341	247	237	237
query7	4648	538	304	304
query8	297	256	269	256
query9	8642	2872	2872	2872
query10	513	346	301	301
query11	15436	15064	14910	14910
query12	179	122	128	122
query13	1695	590	451	451
query14	9464	5815	5885	5815
query15	210	187	185	185
query16	7737	680	511	511
query17	1366	769	651	651
query18	2059	452	358	358
query19	211	248	169	169
query20	131	121	127	121
query21	222	132	114	114
query22	4077	4168	4147	4147
query23	33795	32850	33076	32850
query24	8067	2367	2371	2367
query25	589	533	443	443
query26	805	284	166	166
query27	2665	517	372	372
query28	4324	2231	2218	2218
query29	704	599	493	493
query30	289	228	205	205
query31	941	799	747	747
query32	91	89	96	89
query33	572	390	350	350
query34	804	843	552	552
query35	791	849	761	761
query36	975	1028	926	926
query37	125	110	92	92
query38	4079	4102	4026	4026
query39	1517	1435	1435	1435
query40	223	134	126	126
query41	74	70	66	66
query42	129	125	125	125
query43	502	497	492	492
query44	1318	880	857	857
query45	180	179	173	173
query46	892	1036	645	645
query47	1773	1805	1763	1763
query48	386	426	331	331
query49	694	525	417	417
query50	648	686	409	409
query51	4029	4141	4101	4101
query52	121	112	111	111
query53	249	267	206	206
query54	618	599	544	544
query55	98	92	91	91
query56	341	339	320	320
query57	1187	1187	1145	1145
query58	299	295	279	279
query59	2707	2709	2716	2709
query60	354	351	361	351
query61	169	159	161	159
query62	776	758	668	668
query63	238	190	196	190
query64	3627	1202	834	834
query65	4293	4144	4166	4144
query66	906	452	350	350
query67	15338	15202	15088	15088
query68	9463	938	588	588
query69	491	340	293	293
query70	1226	1176	1144	1144
query71	479	344	341	341
query72	5833	5023	5193	5023
query73	789	696	364	364
query74	9117	9126	8719	8719
query75	4363	3122	2598	2598
query76	3665	1128	729	729
query77	937	415	358	358
query78	9625	9791	8847	8847
query79	1983	803	605	605
query80	659	658	530	530
query81	475	262	228	228
query82	419	137	111	111
query83	268	266	253	253
query84	262	118	89	89
query85	891	456	417	417
query86	362	321	294	294
query87	4239	4280	4185	4185
query88	3252	2211	2300	2211
query89	396	326	292	292
query90	1941	222	216	216
query91	157	160	134	134
query92	91	77	72	72
query93	1562	977	651	651
query94	702	422	327	327
query95	421	334	333	333
query96	492	574	277	277
query97	2640	2659	2585	2585
query98	250	224	227	224
query99	1450	1465	1333	1333
Total cold run time: 274245 ms
Total hot run time: 186779 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.04
query2	0.12	0.08	0.07
query3	0.30	0.07	0.08
query4	1.60	0.10	0.08
query5	0.43	0.46	0.42
query6	1.17	0.64	0.64
query7	0.03	0.03	0.02
query8	0.07	0.06	0.06
query9	0.65	0.55	0.55
query10	0.59	0.58	0.60
query11	0.26	0.13	0.14
query12	0.26	0.14	0.14
query13	0.66	0.63	0.64
query14	0.82	0.84	0.86
query15	0.96	0.87	0.88
query16	0.41	0.40	0.39
query17	1.04	1.07	1.08
query18	0.23	0.22	0.22
query19	1.94	1.78	1.85
query20	0.02	0.01	0.02
query21	15.39	1.05	0.73
query22	0.95	1.15	0.97
query23	14.73	1.55	0.78
query24	5.08	0.63	0.33
query25	0.17	0.11	0.10
query26	0.54	0.22	0.18
query27	0.10	0.09	0.09
query28	11.04	1.28	0.57
query29	12.54	4.07	3.42
query30	3.17	3.04	3.01
query31	2.81	0.65	0.44
query32	3.24	0.60	0.52
query33	3.11	3.21	3.20
query34	16.28	5.50	4.80
query35	4.92	4.86	4.87
query36	0.64	0.53	0.51
query37	0.22	0.19	0.19
query38	0.18	0.16	0.17
query39	0.06	0.06	0.06
query40	0.22	0.18	0.17
query41	0.10	0.06	0.06
query42	0.07	0.06	0.06
query43	0.06	0.06	0.05
Total cold run time: 107.23 s
Total hot run time: 33.87 s

@felixwluo
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 83.63% (1430/1710)
Line Coverage 67.31% (25462/37827)
Region Coverage 68.33% (12680/18556)
Branch Coverage 58.11% (6720/11564)

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	16443	5206	5106	5106
q2	2038	343	209	209
q3	9703	1305	714	714
q4	9655	999	527	527
q5	7172	2404	2308	2308
q6	182	165	136	136
q7	920	760	644	644
q8	8930	1331	1137	1137
q9	7031	5117	5064	5064
q10	6889	2395	1982	1982
q11	499	301	294	294
q12	365	366	232	232
q13	17209	3639	3046	3046
q14	247	243	236	236
q15	564	518	511	511
q16	443	439	388	388
q17	610	855	380	380
q18	7391	7106	7011	7011
q19	1104	957	578	578
q20	356	359	232	232
q21	4014	2576	2412	2412
q22	1056	1026	998	998
Total cold run time: 102821 ms
Total hot run time: 34145 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5166	5106	5126	5106
q2	257	333	235	235
q3	2173	2697	2288	2288
q4	1430	1791	1367	1367
q5	4269	4144	4415	4144
q6	246	185	146	146
q7	2066	2029	1930	1930
q8	2735	2697	2588	2588
q9	7242	7463	7248	7248
q10	3095	3314	2977	2977
q11	587	547	501	501
q12	752	811	642	642
q13	3641	3970	3305	3305
q14	302	318	281	281
q15	516	485	474	474
q16	451	493	450	450
q17	1197	1596	1422	1422
q18	7708	7726	7590	7590
q19	906	843	886	843
q20	2015	2069	1845	1845
q21	4857	4333	4325	4325
q22	1087	1058	1007	1007
Total cold run time: 52698 ms
Total hot run time: 50714 ms

@doris-robot
Copy link

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

query1	1066	446	455	446
query2	6580	1823	1793	1793
query3	6765	235	223	223
query4	26168	23910	23755	23755
query5	4417	660	509	509
query6	341	266	231	231
query7	4650	520	305	305
query8	306	263	247	247
query9	8650	2910	2895	2895
query10	503	347	326	326
query11	15838	15068	15126	15068
query12	174	124	120	120
query13	1676	572	436	436
query14	9114	5952	5843	5843
query15	219	195	172	172
query16	7327	675	471	471
query17	1217	740	660	660
query18	2041	445	398	398
query19	201	195	174	174
query20	145	128	124	124
query21	228	127	111	111
query22	4042	4213	4047	4047
query23	33768	32969	33035	32969
query24	8049	2393	2408	2393
query25	573	525	437	437
query26	1244	281	165	165
query27	2733	514	362	362
query28	4170	2276	2258	2258
query29	806	614	491	491
query30	298	226	202	202
query31	909	815	729	729
query32	92	91	82	82
query33	560	402	367	367
query34	785	863	523	523
query35	833	836	758	758
query36	963	1019	939	939
query37	127	121	97	97
query38	4041	4106	4091	4091
query39	1481	1439	1421	1421
query40	221	145	136	136
query41	71	68	63	63
query42	131	115	118	115
query43	539	524	476	476
query44	1339	879	884	879
query45	184	186	177	177
query46	887	1016	654	654
query47	1798	1850	1732	1732
query48	403	439	349	349
query49	771	512	413	413
query50	644	719	398	398
query51	4325	4128	4109	4109
query52	126	125	104	104
query53	247	274	196	196
query54	619	607	559	559
query55	101	95	93	93
query56	353	338	318	318
query57	1195	1221	1128	1128
query58	305	308	278	278
query59	2563	2716	2670	2670
query60	364	351	352	351
query61	167	158	158	158
query62	798	718	687	687
query63	228	197	198	197
query64	4233	1176	935	935
query65	4335	4207	4230	4207
query66	1149	485	391	391
query67	15380	15122	15111	15111
query68	8058	941	590	590
query69	510	349	310	310
query70	1223	1105	1144	1105
query71	472	358	335	335
query72	5996	5210	5296	5210
query73	715	663	359	359
query74	8930	9139	8877	8877
query75	3801	3131	2663	2663
query76	3704	1147	784	784
query77	856	403	335	335
query78	9653	9892	8875	8875
query79	2587	832	587	587
query80	655	569	509	509
query81	515	277	229	229
query82	465	144	118	118
query83	274	257	245	245
query84	260	110	92	92
query85	905	492	460	460
query86	375	340	324	324
query87	4285	4376	4153	4153
query88	3734	2226	2227	2226
query89	411	335	295	295
query90	1935	231	230	230
query91	173	174	143	143
query92	92	75	76	75
query93	2189	1001	655	655
query94	711	437	329	329
query95	407	332	320	320
query96	492	581	284	284
query97	2641	2670	2621	2621
query98	248	224	221	221
query99	1448	1425	1318	1318
Total cold run time: 275296 ms
Total hot run time: 188399 ms

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage `` 🎉
Increment coverage report
Complete coverage report

@doris-robot
Copy link

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

query1	0.05	0.04	0.04
query2	0.13	0.07	0.06
query3	0.33	0.08	0.07
query4	1.60	0.08	0.08
query5	0.43	0.42	0.41
query6	1.17	0.65	0.64
query7	0.03	0.03	0.03
query8	0.07	0.06	0.06
query9	0.68	0.54	0.54
query10	0.58	0.59	0.59
query11	0.27	0.14	0.14
query12	0.26	0.15	0.14
query13	0.67	0.64	0.64
query14	0.84	0.84	0.87
query15	0.96	0.87	0.87
query16	0.39	0.40	0.40
query17	1.08	1.08	1.08
query18	0.23	0.23	0.23
query19	2.01	1.91	1.87
query20	0.02	0.01	0.02
query21	15.41	1.01	0.72
query22	0.95	1.29	1.01
query23	14.69	1.59	0.80
query24	5.45	0.59	0.31
query25	0.17	0.10	0.09
query26	0.54	0.22	0.18
query27	0.10	0.10	0.09
query28	10.99	1.14	0.58
query29	12.56	4.09	3.40
query30	3.17	3.03	3.05
query31	2.82	0.61	0.43
query32	3.27	0.60	0.51
query33	3.09	3.16	3.17
query34	16.33	5.48	4.76
query35	4.88	4.93	4.89
query36	0.68	0.54	0.50
query37	0.24	0.19	0.19
query38	0.18	0.17	0.16
query39	0.06	0.05	0.05
query40	0.22	0.18	0.17
query41	0.11	0.06	0.06
query42	0.07	0.07	0.06
query43	0.06	0.05	0.06
Total cold run time: 107.84 s
Total hot run time: 33.94 s

@felixwluo
Copy link
Contributor Author

run buildall

@felixwluo
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 83.63% (1430/1710)
Line Coverage 67.35% (25477/37827)
Region Coverage 68.44% (12699/18556)
Branch Coverage 58.15% (6725/11564)

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage `` 🎉
Increment coverage report
Complete coverage report

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Sep 11, 2025
@felixwluo
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17633	5153	5065	5065
q2	1988	327	208	208
q3	10266	1290	720	720
q4	10240	1030	522	522
q5	7568	2372	2356	2356
q6	179	179	140	140
q7	914	767	660	660
q8	9371	1514	1180	1180
q9	7004	5191	5240	5191
q10	6977	2377	1981	1981
q11	518	311	276	276
q12	370	364	219	219
q13	17774	3715	2985	2985
q14	238	247	211	211
q15	553	491	501	491
q16	1003	1001	936	936
q17	622	858	357	357
q18	7434	7346	7150	7150
q19	1521	962	550	550
q20	340	343	225	225
q21	3646	2562	2368	2368
q22	1045	1043	989	989
Total cold run time: 107204 ms
Total hot run time: 34780 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5189	5096	5046	5046
q2	253	346	231	231
q3	2175	2694	2299	2299
q4	1330	1744	1348	1348
q5	4209	4549	4519	4519
q6	213	176	143	143
q7	2021	2056	1802	1802
q8	2609	2611	2616	2611
q9	7647	7360	7283	7283
q10	3155	3359	2853	2853
q11	599	514	495	495
q12	715	770	612	612
q13	3476	4162	3212	3212
q14	317	336	283	283
q15	539	503	478	478
q16	1068	1131	1042	1042
q17	1186	1559	1413	1413
q18	8154	7746	7693	7693
q19	778	873	1010	873
q20	2246	2037	1922	1922
q21	4939	4417	4393	4393
q22	1090	1026	1005	1005
Total cold run time: 53908 ms
Total hot run time: 51556 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 189354 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 1c83db919c23c704785f1ec07c9d0ba81bd03938, data reload: false

query1	1069	447	408	408
query2	6556	1690	1726	1690
query3	6762	229	232	229
query4	26093	23458	23371	23371
query5	4456	653	525	525
query6	349	247	233	233
query7	4654	512	305	305
query8	323	269	271	269
query9	8657	2920	2930	2920
query10	509	377	297	297
query11	16133	14972	14719	14719
query12	177	127	128	127
query13	1707	580	462	462
query14	10875	9216	9218	9216
query15	215	191	179	179
query16	7741	674	496	496
query17	1243	780	658	658
query18	2068	447	398	398
query19	202	197	171	171
query20	137	125	121	121
query21	215	131	116	116
query22	4184	4074	4018	4018
query23	34262	32918	32923	32918
query24	8177	2370	2396	2370
query25	580	536	447	447
query26	1232	280	171	171
query27	2706	508	363	363
query28	4407	2270	2253	2253
query29	802	624	496	496
query30	296	230	202	202
query31	914	824	747	747
query32	92	80	78	78
query33	583	403	350	350
query34	801	870	514	514
query35	814	898	778	778
query36	965	1017	918	918
query37	131	117	103	103
query38	3545	3565	3519	3519
query39	1517	1423	1417	1417
query40	229	133	132	132
query41	67	60	63	60
query42	129	115	124	115
query43	508	484	457	457
query44	1350	851	853	851
query45	193	175	172	172
query46	841	1018	661	661
query47	1755	1826	1767	1767
query48	418	412	335	335
query49	749	509	423	423
query50	654	675	393	393
query51	3868	3987	3879	3879
query52	118	113	107	107
query53	245	275	202	202
query54	613	600	547	547
query55	100	92	91	91
query56	344	345	326	326
query57	1206	1227	1124	1124
query58	293	286	289	286
query59	2573	2714	2551	2551
query60	363	357	352	352
query61	170	162	160	160
query62	821	730	676	676
query63	228	204	194	194
query64	4390	1138	886	886
query65	4068	3978	3977	3977
query66	1112	453	375	375
query67	15539	15386	15112	15112
query68	9570	925	592	592
query69	489	332	304	304
query70	1347	1354	1289	1289
query71	559	350	323	323
query72	5997	4972	5093	4972
query73	746	627	356	356
query74	9134	8925	8889	8889
query75	4387	3233	2911	2911
query76	3720	1153	735	735
query77	924	401	332	332
query78	9686	9823	8796	8796
query79	1802	845	595	595
query80	707	592	537	537
query81	474	262	227	227
query82	257	179	148	148
query83	363	264	259	259
query84	302	108	94	94
query85	861	476	435	435
query86	348	327	297	297
query87	3762	3757	3585	3585
query88	2767	2178	2198	2178
query89	409	322	289	289
query90	2055	226	226	226
query91	171	166	137	137
query92	97	76	72	72
query93	1137	985	651	651
query94	689	415	320	320
query95	412	329	324	324
query96	476	598	278	278
query97	2918	2993	2871	2871
query98	242	226	215	215
query99	1477	1461	1334	1334
Total cold run time: 277378 ms
Total hot run time: 189354 ms

@doris-robot
Copy link

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

query1	0.06	0.05	0.05
query2	0.09	0.06	0.05
query3	0.26	0.08	0.09
query4	1.61	0.12	0.12
query5	0.27	0.27	0.25
query6	1.18	0.66	0.63
query7	0.03	0.04	0.03
query8	0.05	0.05	0.04
query9	0.62	0.52	0.53
query10	0.58	0.58	0.59
query11	0.17	0.12	0.12
query12	0.16	0.12	0.12
query13	0.63	0.63	0.65
query14	1.03	1.04	1.02
query15	0.88	0.85	0.92
query16	0.41	0.41	0.40
query17	1.07	1.05	1.04
query18	0.21	0.20	0.21
query19	1.96	1.80	1.79
query20	0.01	0.01	0.02
query21	15.39	0.96	0.58
query22	0.78	1.23	0.84
query23	14.79	1.41	0.61
query24	6.76	1.26	1.10
query25	0.61	0.19	0.09
query26	0.60	0.16	0.14
query27	0.06	0.05	0.05
query28	9.65	0.98	0.43
query29	12.57	3.92	3.21
query30	0.28	0.14	0.11
query31	2.84	0.58	0.37
query32	3.24	0.57	0.47
query33	3.07	3.14	3.12
query34	15.89	5.49	4.85
query35	4.96	4.96	4.90
query36	0.71	0.53	0.51
query37	0.11	0.08	0.08
query38	0.07	0.05	0.04
query39	0.04	0.03	0.03
query40	0.19	0.15	0.15
query41	0.09	0.03	0.03
query42	0.05	0.03	0.02
query43	0.04	0.03	0.04
Total cold run time: 104.07 s
Total hot run time: 30.29 s

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 65.00% (13/20) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 51.98% (17303/33287)
Line Coverage 37.33% (157766/422620)
Region Coverage 32.00% (120554/376725)
Branch Coverage 33.35% (52867/158531)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 90.00% (18/20) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 70.82% (23147/32685)
Line Coverage 57.20% (241598/422365)
Region Coverage 52.39% (200212/382153)
Branch Coverage 54.19% (86398/159434)

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

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

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 90.00% (18/20) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 70.82% (23147/32685)
Line Coverage 57.20% (241598/422365)
Region Coverage 52.39% (200212/382153)
Branch Coverage 54.19% (86398/159434)

@dataroaring dataroaring merged commit 2e15ca5 into apache:master Sep 12, 2025
26 of 29 checks passed
github-actions bot pushed a commit that referenced this pull request Sep 12, 2025
…y evicted after compaction, causing query failures (#55382)

### What problem does this PR solve?
Problem Summary:

1. Problem background
`There is a critical bug in Doris's compaction: after input rowsets
participate in compaction, their expiration time calculation incorrectly
uses the rowset's creation time (creation_time), instead of the
compaction completion time`

2. Scene
for example:
a. After compaction is completed, the rowset should be discarded after
another tablet_rowset_stale_sweep_time_sec
b. Due to the use of creation time calculation, rowset is immediately
eliminated
c. The executing query failed, error occurred : [E-230]fail to find path
in version_graph. spec_version: 0-1789 versions are already compacted

3. Cause
a. In the current implementation, TimestampedVersion is created using
rs->creation_time()
b. Elimination judgment logic : `rowset_creation_time <= (current_time -
tablet_rowset_stale_sweep_time_sec)`
c. For earlier created rowsets, even if they have just participated in
compaction, they will be immediately discarded due to their long
creation time

### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [ ] 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 <!-- Add your reason?  -->

- Behavior changed:
    - [ ] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
morrySnow pushed a commit that referenced this pull request Sep 19, 2025
…e prematurely evicted after compaction, causing query failures #55382 (#55966)

Cherry-picked from #55382

Co-authored-by: lw112 <131352377+felixwluo@users.noreply.github.com>
@morrySnow morrySnow mentioned this pull request Sep 22, 2025
w41ter pushed a commit to w41ter/incubator-doris that referenced this pull request Dec 26, 2025
…y evicted after compaction, causing query failures (apache#55382) (apache#5870)

pick:apache#55382

Co-authored-by: lw112 <131352377+felixwluo@users.noreply.github.com>
yiguolei pushed a commit to yiguolei/incubator-doris that referenced this pull request Dec 30, 2025
…y evicted after compaction, causing query failures (apache#55382) (apache#5871)

pick:apache#55382

Co-authored-by: lw112 <131352377+felixwluo@users.noreply.github.com>
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.x-conflict dev/3.1.1-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants