Skip to content

branch-3.1: [fix](mow) reduce mow delete bitmap count: agg and remove delete bitmap of pre rowsets when cu compaction (#49383)#52204

Merged
morrySnow merged 4 commits into
apache:branch-3.1from
mymeiyi:3.1-pick-49383
Jun 24, 2025
Merged

branch-3.1: [fix](mow) reduce mow delete bitmap count: agg and remove delete bitmap of pre rowsets when cu compaction (#49383)#52204
morrySnow merged 4 commits into
apache:branch-3.1from
mymeiyi:3.1-pick-49383

Conversation

@mymeiyi

@mymeiyi mymeiyi commented Jun 24, 2025

Copy link
Copy Markdown
Contributor

pick #49383

@mymeiyi mymeiyi requested a review from morrySnow as a code owner June 24, 2025 07:46
@Thearas

Thearas commented Jun 24, 2025

Copy link
Copy Markdown
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 added 4 commits June 24, 2025 16:24
…ap of pre rowsets when cu compaction (apache#49383)

This PR reduce delete bitmap count of mow tables

1. when do cumulative compaction [start_rowset, end_rowset], which
version is [start_version, end_version]
2. agg pre_rowsets'(version less than start_version) delete bitmap
between [start_version, end_version] to end_version,
3. when all of the rowsets of [start_rowset, end_rowset] are deleted,
delete pre rowsets' delete bitmap between [start_version, end_version).

suppose the rowset and delete bitmap layout is:
```
[rowset_id]:   [delete bitmap]
    r1-3:          v6, v7, v8, v9
    r4-6:              v7, v8, v9
    r7:                    v8, v9
    r8:                        v9
    r9:
```

if do cumulative compaction for {r7, r8, r9}

before this pr, the delete bitmap layout is (there is 7 delete bitmap
left):
```
[rowset_id]:   [delete bitmap]
    r1-3:          v6, v7, v8, v9
    r4-6:              v7, v8, v9
    r7-9:

```

after this pr (there is 3 delete bitmap left):
```
[rowset_id]:   [delete bitmap]
    r1-3:         v6, new_v9       // new_v9 is agged by the previous v7, v8, v9 of r1-3
    r4-6:             new_v9       // new_v9 is agged by the previous v7, v8, v9 of r4-6
    r7-9:
```

1. agged when delete stale rowset path
2. removed when delete unused rowsets

`save_meta` to store delete bitmap after remove unused rowsets related
delete bitmap

1. agged when delete stale rowset path
2. removed when delete unused rowsets

1. agged when finish compaction
2. send `update_delete_bitmap` to ms to modify and remove pre rowsets
delete bitmap

None
@mymeiyi

mymeiyi commented Jun 24, 2025

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 83.44% (267/320) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 83.25% (1123/1349)
Line Coverage 66.84% (19358/28962)
Region Coverage 66.46% (9571/14402)
Branch Coverage 56.51% (5205/9210)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 2.71% (12/443) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 41.31% (10961/26534)
Line Coverage 32.13% (94186/293150)
Region Coverage 31.21% (48575/155618)
Branch Coverage 27.90% (25085/89916)

@doris-robot

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

------ Round 1 ----------------------------------
q1	18005	6834	6632	6632
q2	2072	174	191	174
q3	10909	1064	1205	1064
q4	10321	751	793	751
q5	7762	2920	2833	2833
q6	217	137	134	134
q7	1018	628	621	621
q8	9364	1988	1996	1988
q9	6581	6450	6464	6450
q10	7041	2244	2307	2244
q11	476	266	255	255
q12	392	210	208	208
q13	17781	2967	2964	2964
q14	238	215	213	213
q15	494	460	470	460
q16	475	366	365	365
q17	978	601	564	564
q18	7312	6717	6618	6618
q19	1335	970	1015	970
q20	475	200	202	200
q21	3929	3062	3216	3062
q22	1128	995	996	995
Total cold run time: 108303 ms
Total hot run time: 39765 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6604	6550	6556	6550
q2	329	231	234	231
q3	2897	2783	2892	2783
q4	2107	1806	1788	1788
q5	5757	5729	5702	5702
q6	218	132	129	129
q7	2204	1793	1768	1768
q8	3354	3537	3525	3525
q9	8942	8666	8913	8666
q10	3585	3538	3530	3530
q11	604	494	500	494
q12	813	613	614	613
q13	9136	3144	3169	3144
q14	304	279	288	279
q15	508	463	456	456
q16	507	449	453	449
q17	1851	1589	1582	1582
q18	8197	7768	7615	7615
q19	1711	1656	1442	1442
q20	2088	1839	1824	1824
q21	5192	5133	4960	4960
q22	1152	1085	1037	1037
Total cold run time: 68060 ms
Total hot run time: 58567 ms

@doris-robot

Copy link
Copy Markdown
TPC-DS: Total hot run time: 196807 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 39fea78f1f0b8a47267a61b78b2a70baa7842fa8, data reload: false

query1	1313	928	883	883
query2	6275	1887	1861	1861
query3	10893	4560	4427	4427
query4	61718	29148	23880	23880
query5	5270	456	454	454
query6	397	173	186	173
query7	5449	303	331	303
query8	324	231	225	225
query9	8607	2578	2566	2566
query10	464	258	271	258
query11	17814	15446	15749	15446
query12	160	104	104	104
query13	1462	439	426	426
query14	9892	6624	6640	6624
query15	201	183	175	175
query16	7287	474	483	474
query17	1181	590	603	590
query18	1810	334	314	314
query19	211	167	163	163
query20	125	110	110	110
query21	204	103	105	103
query22	4648	4652	4725	4652
query23	35063	34087	34207	34087
query24	6730	2902	2916	2902
query25	562	422	420	420
query26	665	168	167	167
query27	2198	373	359	359
query28	4372	2184	2149	2149
query29	724	443	432	432
query30	232	167	161	161
query31	988	783	808	783
query32	65	57	55	55
query33	458	291	296	291
query34	930	509	515	509
query35	827	710	727	710
query36	1075	971	952	952
query37	116	68	69	68
query38	4052	3959	3958	3958
query39	1507	1478	1477	1477
query40	220	100	100	100
query41	45	47	57	47
query42	116	95	103	95
query43	517	464	480	464
query44	1218	819	825	819
query45	185	171	176	171
query46	1156	762	738	738
query47	2041	1932	1942	1932
query48	439	356	339	339
query49	747	389	393	389
query50	835	428	439	428
query51	7423	7284	7309	7284
query52	93	90	90	90
query53	249	180	183	180
query54	583	474	451	451
query55	75	82	75	75
query56	261	246	249	246
query57	1334	1232	1239	1232
query58	221	206	208	206
query59	3232	2981	2945	2945
query60	294	262	263	262
query61	116	126	147	126
query62	797	660	696	660
query63	215	193	181	181
query64	1361	669	635	635
query65	3243	3204	3181	3181
query66	693	291	292	291
query67	15852	15589	15490	15490
query68	4152	562	552	552
query69	433	265	262	262
query70	1193	1052	1122	1052
query71	351	265	260	260
query72	6367	4038	4051	4038
query73	750	343	351	343
query74	10408	8828	9012	8828
query75	3318	2656	2678	2656
query76	2028	1017	1038	1017
query77	483	268	274	268
query78	10700	9531	9565	9531
query79	1216	583	588	583
query80	840	447	416	416
query81	507	223	221	221
query82	1327	86	84	84
query83	249	152	142	142
query84	283	83	78	78
query85	872	304	287	287
query86	318	283	289	283
query87	4372	4227	4205	4205
query88	3492	2378	2376	2376
query89	418	288	288	288
query90	2006	182	183	182
query91	140	107	106	106
query92	61	51	50	50
query93	1257	540	552	540
query94	744	279	261	261
query95	357	253	250	250
query96	603	282	276	276
query97	3335	3131	3140	3131
query98	219	198	196	196
query99	1827	1297	1309	1297
Total cold run time: 314456 ms
Total hot run time: 196807 ms

@doris-robot

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

query1	0.04	0.03	0.02
query2	0.08	0.05	0.05
query3	0.23	0.05	0.05
query4	1.65	0.10	0.09
query5	0.52	0.50	0.50
query6	1.14	0.75	0.74
query7	0.03	0.02	0.01
query8	0.05	0.05	0.05
query9	0.55	0.50	0.49
query10	0.55	0.56	0.56
query11	0.16	0.12	0.12
query12	0.15	0.13	0.13
query13	0.61	0.59	0.60
query14	0.78	0.80	0.82
query15	0.85	0.86	0.83
query16	0.36	0.37	0.35
query17	1.07	1.02	1.04
query18	0.19	0.18	0.20
query19	1.85	1.81	1.87
query20	0.02	0.01	0.01
query21	15.42	0.67	0.66
query22	3.75	6.21	2.02
query23	18.28	1.41	1.28
query24	2.18	0.23	0.24
query25	0.15	0.08	0.09
query26	0.30	0.18	0.17
query27	0.08	0.07	0.07
query28	13.27	0.59	0.58
query29	12.67	3.33	3.28
query30	0.24	0.05	0.06
query31	2.86	0.40	0.41
query32	3.22	0.48	0.48
query33	3.02	3.00	3.02
query34	17.03	4.57	4.57
query35	4.65	4.63	4.58
query36	0.66	0.51	0.48
query37	0.20	0.17	0.16
query38	0.16	0.16	0.16
query39	0.05	0.04	0.04
query40	0.16	0.13	0.13
query41	0.10	0.04	0.04
query42	0.06	0.06	0.06
query43	0.05	0.05	0.04
Total cold run time: 109.44 s
Total hot run time: 30.96 s

@morrySnow morrySnow merged commit 88f3fe1 into apache:branch-3.1 Jun 24, 2025
20 of 21 checks passed
@mymeiyi mymeiyi deleted the 3.1-pick-49383 branch September 10, 2025 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants