Skip to content

Conversation

@mymeiyi
Copy link
Contributor

@mymeiyi mymeiyi commented Mar 12, 2025

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

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?

@mymeiyi mymeiyi marked this pull request as ready for review March 12, 2025 09:02
@mymeiyi
Copy link
Contributor Author

mymeiyi commented Mar 12, 2025

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17647	5292	5079	5079
q2	2046	298	171	171
q3	10412	1404	750	750
q4	10214	1056	563	563
q5	7547	2449	2403	2403
q6	195	164	134	134
q7	930	753	621	621
q8	9340	1361	1200	1200
q9	5033	4757	4659	4659
q10	6827	2332	1904	1904
q11	480	284	265	265
q12	361	353	216	216
q13	17752	3715	3134	3134
q14	223	242	218	218
q15	533	477	490	477
q16	622	612	592	592
q17	595	904	348	348
q18	7383	6473	6470	6470
q19	1662	956	579	579
q20	332	350	198	198
q21	2865	2166	1974	1974
q22	1043	1014	980	980
Total cold run time: 104042 ms
Total hot run time: 32935 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5543	5183	5168	5168
q2	258	333	226	226
q3	2197	2702	2328	2328
q4	1471	1851	1371	1371
q5	4283	4150	4182	4150
q6	208	172	125	125
q7	1989	1959	1805	1805
q8	2674	2709	2530	2530
q9	7366	7318	7092	7092
q10	3040	3250	2715	2715
q11	589	515	489	489
q12	695	796	624	624
q13	3539	3897	3258	3258
q14	295	319	268	268
q15	532	481	482	481
q16	645	696	647	647
q17	1217	1615	1382	1382
q18	7870	7570	7583	7570
q19	857	959	1038	959
q20	1965	1958	1814	1814
q21	5538	5027	4900	4900
q22	1121	1048	1054	1048
Total cold run time: 53892 ms
Total hot run time: 50950 ms

@doris-robot
Copy link

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

query1	1411	1022	991	991
query2	6161	1978	1899	1899
query3	11054	4638	4604	4604
query4	54087	25198	23404	23404
query5	5241	531	482	482
query6	407	187	209	187
query7	5491	525	304	304
query8	356	264	248	248
query9	7645	2548	2562	2548
query10	439	340	267	267
query11	15538	15219	14867	14867
query12	176	114	105	105
query13	1372	538	409	409
query14	9935	6619	6524	6524
query15	208	204	197	197
query16	7027	670	493	493
query17	1088	771	593	593
query18	1534	423	333	333
query19	205	208	177	177
query20	131	133	138	133
query21	211	125	102	102
query22	4448	4599	4430	4430
query23	34110	33531	33679	33531
query24	6410	2429	2462	2429
query25	489	481	421	421
query26	776	285	157	157
query27	2270	512	336	336
query28	3506	2426	2441	2426
query29	664	574	443	443
query30	276	232	214	214
query31	893	846	792	792
query32	80	70	63	63
query33	449	372	312	312
query34	774	882	509	509
query35	817	858	760	760
query36	988	1030	952	952
query37	119	101	75	75
query38	4182	4260	4142	4142
query39	1507	1450	1490	1450
query40	221	116	108	108
query41	53	52	48	48
query42	124	108	102	102
query43	503	517	505	505
query44	1392	837	833	833
query45	195	176	172	172
query46	892	1067	662	662
query47	1871	1861	1746	1746
query48	408	421	315	315
query49	712	508	419	419
query50	819	781	448	448
query51	4352	4294	4255	4255
query52	111	113	99	99
query53	245	273	194	194
query54	512	511	427	427
query55	86	86	86	86
query56	274	289	282	282
query57	1176	1182	1106	1106
query58	249	248	240	240
query59	2708	3009	2749	2749
query60	295	271	295	271
query61	126	122	118	118
query62	718	755	656	656
query63	240	199	190	190
query64	2192	1022	674	674
query65	4408	4352	4356	4352
query66	780	400	294	294
query67	15910	15550	15270	15270
query68	7061	905	509	509
query69	546	307	267	267
query70	1186	1147	1092	1092
query71	505	296	279	279
query72	5846	3574	3770	3574
query73	1123	728	354	354
query74	9167	9142	8736	8736
query75	3702	3173	2715	2715
query76	4445	1191	775	775
query77	612	384	278	278
query78	9975	10194	9275	9275
query79	1510	851	586	586
query80	724	554	455	455
query81	491	256	227	227
query82	431	130	97	97
query83	297	179	148	148
query84	287	103	77	77
query85	856	357	307	307
query86	365	310	293	293
query87	4365	4535	4360	4360
query88	2903	2282	2261	2261
query89	410	316	287	287
query90	1963	217	223	217
query91	137	146	110	110
query92	78	63	57	57
query93	1215	1082	588	588
query94	708	421	294	294
query95	361	276	261	261
query96	480	567	274	274
query97	3358	3433	3352	3352
query98	218	206	191	191
query99	1456	1392	1286	1286
Total cold run time: 300828 ms
Total hot run time: 192512 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 b9d4ea112306d4ea3a96bc2ca60b26d3f47255a0, data reload: false

query1	0.03	0.03	0.03
query2	0.07	0.04	0.03
query3	0.23	0.07	0.06
query4	1.62	0.10	0.10
query5	0.55	0.55	0.55
query6	1.21	0.71	0.71
query7	0.02	0.01	0.02
query8	0.04	0.03	0.02
query9	0.59	0.52	0.52
query10	0.58	0.61	0.58
query11	0.16	0.10	0.10
query12	0.14	0.11	0.12
query13	0.62	0.61	0.59
query14	2.66	2.82	2.81
query15	0.94	0.85	0.85
query16	0.38	0.38	0.37
query17	1.00	1.03	0.99
query18	0.22	0.19	0.20
query19	1.89	1.75	1.98
query20	0.01	0.01	0.01
query21	15.36	0.92	0.56
query22	0.75	1.25	0.68
query23	14.86	1.43	0.60
query24	6.54	1.71	0.99
query25	0.48	0.25	0.13
query26	0.68	0.16	0.13
query27	0.06	0.04	0.04
query28	9.14	0.90	0.44
query29	12.53	4.05	3.31
query30	0.26	0.09	0.07
query31	2.82	0.59	0.39
query32	3.23	0.55	0.47
query33	3.09	3.01	3.02
query34	15.81	5.07	4.48
query35	4.52	4.58	4.50
query36	0.65	0.48	0.48
query37	0.09	0.07	0.06
query38	0.05	0.04	0.04
query39	0.04	0.03	0.03
query40	0.17	0.13	0.13
query41	0.08	0.03	0.03
query42	0.04	0.03	0.02
query43	0.03	0.03	0.03
Total cold run time: 104.24 s
Total hot run time: 31 s

// remove rowset delete bitmap
delete_bitmap().remove({(*it)->rowset_id(), 0, 0},
{(*it)->rowset_id(), UINT32_MAX, 0});
delete_bitmap().remove_rowset_cache_version((*it)->rowset_id());
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a DCHECK at the end of the fucntion, to check that the size of _rowset_cache_version is smaller than the size of _rs_metas.size() + _stale_rs_metas.size() to avoid mem leak

@dataroaring dataroaring added usercase Important user case type label dev/3.0.x labels Mar 13, 2025
// of cache entries in some cases?
if (val == nullptr) { // Renew if needed, put a new Value to cache
val = new AggCache::Value();
Version start_version = _get_rowset_cache_version(bmk);
Copy link
Contributor

Choose a reason for hiding this comment

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

add a config to control whether this feature is enabled.

@mymeiyi
Copy link
Contributor Author

mymeiyi commented Mar 14, 2025

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17591	5154	5028	5028
q2	2044	291	166	166
q3	10479	1324	754	754
q4	10202	1034	550	550
q5	7528	2390	2363	2363
q6	184	160	129	129
q7	918	743	605	605
q8	9302	1276	1111	1111
q9	4816	4878	4831	4831
q10	6833	2329	1878	1878
q11	472	267	265	265
q12	344	350	215	215
q13	17780	3706	3081	3081
q14	228	241	213	213
q15	519	493	473	473
q16	621	606	571	571
q17	574	879	353	353
q18	6792	6539	6273	6273
q19	2892	964	543	543
q20	313	322	190	190
q21	2809	2213	1904	1904
q22	1018	1018	983	983
Total cold run time: 104259 ms
Total hot run time: 32479 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5307	5078	5091	5078
q2	248	332	243	243
q3	2200	2681	2311	2311
q4	1425	1819	1380	1380
q5	4243	4164	4128	4128
q6	206	165	123	123
q7	1959	1948	1771	1771
q8	2620	2662	2628	2628
q9	7250	7174	7198	7174
q10	3061	3198	2776	2776
q11	594	504	499	499
q12	667	733	606	606
q13	3418	3950	3277	3277
q14	287	294	274	274
q15	540	486	478	478
q16	644	717	666	666
q17	1156	1638	1334	1334
q18	7743	7487	7481	7481
q19	814	785	852	785
q20	2006	2035	1899	1899
q21	5513	4976	4756	4756
q22	1080	1053	1021	1021
Total cold run time: 52981 ms
Total hot run time: 50688 ms

@doris-robot
Copy link

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

query1	1402	1013	983	983
query2	6189	2024	2044	2024
query3	11012	4619	4609	4609
query4	55252	24923	22960	22960
query5	4914	534	479	479
query6	326	197	193	193
query7	4912	516	295	295
query8	313	252	233	233
query9	5525	2645	2637	2637
query10	444	320	257	257
query11	15229	15180	14933	14933
query12	160	116	106	106
query13	1044	518	410	410
query14	10234	6948	6573	6573
query15	209	197	181	181
query16	7194	659	509	509
query17	1143	758	595	595
query18	1691	435	325	325
query19	193	199	169	169
query20	124	124	124	124
query21	217	129	102	102
query22	4589	4455	4289	4289
query23	34000	33253	33318	33253
query24	5817	2434	2449	2434
query25	455	466	394	394
query26	714	289	159	159
query27	1776	477	340	340
query28	3063	2511	2442	2442
query29	594	572	430	430
query30	278	218	197	197
query31	882	884	776	776
query32	73	60	66	60
query33	462	373	330	330
query34	783	853	539	539
query35	789	869	761	761
query36	956	1024	929	929
query37	126	99	77	77
query38	4217	4276	4345	4276
query39	1489	1419	1438	1419
query40	211	125	105	105
query41	53	56	50	50
query42	123	105	105	105
query43	533	528	518	518
query44	1384	832	801	801
query45	179	175	169	169
query46	872	1053	645	645
query47	1846	1868	1796	1796
query48	390	422	315	315
query49	687	530	443	443
query50	710	753	440	440
query51	4366	4257	4268	4257
query52	141	106	98	98
query53	234	262	189	189
query54	510	522	422	422
query55	85	91	87	87
query56	294	269	259	259
query57	1150	1180	1112	1112
query58	250	243	234	234
query59	2981	2933	2953	2933
query60	295	283	272	272
query61	126	123	129	123
query62	783	748	701	701
query63	230	198	195	195
query64	2060	1038	703	703
query65	4558	4468	4384	4384
query66	755	393	297	297
query67	15972	15460	15393	15393
query68	7577	835	507	507
query69	539	297	260	260
query70	1189	1131	1105	1105
query71	485	293	269	269
query72	6024	3630	3773	3630
query73	1473	758	351	351
query74	9067	9186	8703	8703
query75	3781	3214	2707	2707
query76	4175	1203	773	773
query77	618	383	273	273
query78	10105	10051	9264	9264
query79	4230	826	568	568
query80	681	520	448	448
query81	486	269	221	221
query82	609	130	94	94
query83	274	177	161	161
query84	288	96	77	77
query85	851	346	338	338
query86	376	318	303	303
query87	4424	4463	4336	4336
query88	3530	2299	2295	2295
query89	452	319	290	290
query90	1934	213	213	213
query91	144	143	111	111
query92	80	60	60	60
query93	2535	1038	588	588
query94	683	410	300	300
query95	344	285	257	257
query96	486	564	281	281
query97	3353	3408	3285	3285
query98	220	206	199	199
query99	1469	1395	1256	1256
Total cold run time: 303050 ms
Total hot run time: 192371 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.04
query2	0.07	0.03	0.03
query3	0.24	0.06	0.06
query4	1.62	0.10	0.11
query5	0.55	0.53	0.56
query6	1.20	0.71	0.72
query7	0.02	0.01	0.01
query8	0.04	0.03	0.04
query9	0.58	0.51	0.51
query10	0.58	0.61	0.58
query11	0.16	0.12	0.10
query12	0.14	0.11	0.11
query13	0.61	0.61	0.59
query14	2.67	2.73	2.68
query15	0.94	0.86	0.84
query16	0.38	0.38	0.39
query17	1.02	1.04	1.04
query18	0.21	0.20	0.20
query19	1.91	1.82	1.97
query20	0.02	0.01	0.01
query21	15.36	0.89	0.53
query22	0.75	1.32	0.82
query23	14.72	1.37	0.63
query24	7.32	0.83	1.51
query25	0.57	0.23	0.12
query26	0.59	0.17	0.13
query27	0.05	0.06	0.05
query28	9.83	0.86	0.42
query29	12.56	3.96	3.32
query30	0.25	0.10	0.07
query31	2.82	0.58	0.39
query32	3.22	0.54	0.46
query33	3.01	3.09	3.09
query34	15.75	5.11	4.49
query35	4.48	4.48	4.51
query36	0.68	0.50	0.48
query37	0.09	0.07	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.08	0.03	0.03
query42	0.03	0.03	0.02
query43	0.04	0.03	0.02
Total cold run time: 105.44 s
Total hot run time: 30.99 s

@mymeiyi
Copy link
Contributor Author

mymeiyi commented Mar 14, 2025

run be_ut

Copy link
Contributor

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

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

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 59.26% (32/54) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 48.27% (12913/26752)
Line Coverage 37.63% (110318/293133)
Region Coverage 36.71% (56460/153815)
Branch Coverage 31.92% (28410/89002)

@zhannngchen zhannngchen merged commit 2ff416e into apache:master Mar 15, 2025
24 of 26 checks passed
dataroaring pushed a commit that referenced this pull request Mar 17, 2025
Cherry-picked from #48968

Co-authored-by: meiyi <meiyi@selectdb.com>
zhannngchen pushed a commit that referenced this pull request Mar 20, 2025
Problem Summary:
introduced by #48968, fix the
rowset_cache_version is not deleted if _rs_metas or _stale_rs_metas is
changed:
```
F20250319 13:41:54.708062  5890 tablet_meta.cpp:955] Check failed: false . tablet: 1742356296291, rowset_cache_version size: 1607, _rs_metas size: 135, _stale_rs_metas size: 707
*** Check failure stack trace: ***
    @     0x55aa24363916  google::LogMessage::SendToLog()
    @     0x55aa24360360  google::LogMessage::Flush()
    @     0x55aa24364159  google::LogMessageFatal::~LogMessageFatal()
    @     0x55aa19c476a9  doris::TabletMeta::delete_stale_rs_meta_by_version()
    @     0x55aa19bf38b3  doris::Tablet::_delete_stale_rowset_by_version()
    @     0x55aa19bf451a  doris::Tablet::delete_expired_stale_rowset()
    @     0x55aa19c264f8  doris::TabletManager::for_each_tablet()
    @     0x55aa19c2a473  doris::TabletManager::start_trash_sweep()
    @     0x55aa19bd3fa5  doris::StorageEngine::start_trash_sweep()
    @     0x55aa198b9da6  doris::StorageEngine::_garbage_sweeper_thread_callback()
```
github-actions bot pushed a commit that referenced this pull request Mar 20, 2025
Problem Summary:
introduced by #48968, fix the
rowset_cache_version is not deleted if _rs_metas or _stale_rs_metas is
changed:
```
F20250319 13:41:54.708062  5890 tablet_meta.cpp:955] Check failed: false . tablet: 1742356296291, rowset_cache_version size: 1607, _rs_metas size: 135, _stale_rs_metas size: 707
*** Check failure stack trace: ***
    @     0x55aa24363916  google::LogMessage::SendToLog()
    @     0x55aa24360360  google::LogMessage::Flush()
    @     0x55aa24364159  google::LogMessageFatal::~LogMessageFatal()
    @     0x55aa19c476a9  doris::TabletMeta::delete_stale_rs_meta_by_version()
    @     0x55aa19bf38b3  doris::Tablet::_delete_stale_rowset_by_version()
    @     0x55aa19bf451a  doris::Tablet::delete_expired_stale_rowset()
    @     0x55aa19c264f8  doris::TabletManager::for_each_tablet()
    @     0x55aa19c2a473  doris::TabletManager::start_trash_sweep()
    @     0x55aa19bd3fa5  doris::StorageEngine::start_trash_sweep()
    @     0x55aa198b9da6  doris::StorageEngine::_garbage_sweeper_thread_callback()
```
@gavinchou gavinchou mentioned this pull request Apr 23, 2025
koarz pushed a commit to koarz/doris that referenced this pull request Jun 4, 2025
koarz pushed a commit to koarz/doris that referenced this pull request Jun 4, 2025
Problem Summary:
introduced by apache#48968, fix the
rowset_cache_version is not deleted if _rs_metas or _stale_rs_metas is
changed:
```
F20250319 13:41:54.708062  5890 tablet_meta.cpp:955] Check failed: false . tablet: 1742356296291, rowset_cache_version size: 1607, _rs_metas size: 135, _stale_rs_metas size: 707
*** Check failure stack trace: ***
    @     0x55aa24363916  google::LogMessage::SendToLog()
    @     0x55aa24360360  google::LogMessage::Flush()
    @     0x55aa24364159  google::LogMessageFatal::~LogMessageFatal()
    @     0x55aa19c476a9  doris::TabletMeta::delete_stale_rs_meta_by_version()
    @     0x55aa19bf38b3  doris::Tablet::_delete_stale_rowset_by_version()
    @     0x55aa19bf451a  doris::Tablet::delete_expired_stale_rowset()
    @     0x55aa19c264f8  doris::TabletManager::for_each_tablet()
    @     0x55aa19c2a473  doris::TabletManager::start_trash_sweep()
    @     0x55aa19bd3fa5  doris::StorageEngine::start_trash_sweep()
    @     0x55aa198b9da6  doris::StorageEngine::_garbage_sweeper_thread_callback()
```
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.5-merged reviewed usercase Important user case type label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants