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

[improve](cloud-mow) merge and remove old version of delete bitmap when cumulative compaction is done #40204

Merged
merged 22 commits into from
Sep 20, 2024

Conversation

hust-hhb
Copy link
Contributor

@hust-hhb hust-hhb commented Aug 30, 2024

When the count of delete bitmap is big, it may lead to high cpu use rate, we can merge old version delete bitmap to reduce the count of delete bitmap when cumulative compaction is done to reduce the use rate of cpu.
Here is an example:
before cu compaciton ,rowset layout is

"cumulative point": 10,
"rowsets": [
    "[0-1] 0 DATA NONOVERLAPPING 0200000000000000ffffffffffffffecffffffffffffffff 0",
    "[2-9] 1 DATA NONOVERLAPPING 0200000000002cc1a8447a4e0ba5850f773803ae2d534284 1.21 KB",
    "[10-10] 1 DATA NONOVERLAPPING 0200000000002d07a8447a4e0ba5850f773803ae2d534284 1.09 KB",
    "[11-11] 1 DATA NONOVERLAPPING 0200000000002d14a8447a4e0ba5850f773803ae2d534284 1.10 KB",
    "[12-12] 1 DATA NONOVERLAPPING 0200000000002d23a8447a4e0ba5850f773803ae2d534284 1.10 KB",
    "[13-13] 1 DATA NONOVERLAPPING 0200000000002d33a8447a4e0ba5850f773803ae2d534284 1.10 KB",
    "[14-14] 1 DATA NONOVERLAPPING 0200000000002d40a8447a4e0ba5850f773803ae2d534284 1.10 KB"
],

base rowset is [2-9], now cu compaciton input rowset range is [10-14], after compaciton, rowset layout is

"cumulative point": 10,
"rowsets": [
    "[0-1] 0 DATA NONOVERLAPPING 0200000000000000ffffffffffffffecffffffffffffffff 0",
    "[2-9] 1 DATA NONOVERLAPPING 0200000000002cc1a8447a4e0ba5850f773803ae2d534284 1.21 KB",
    "[10-14] 1 DATA NONOVERLAPPING 0200000000002d63a8447a4e0ba5850f773803ae2d534284 1.21 KB"
],
  1. the delete bitmap of rowset [10-10] -> [11-11] -> [12-12] -> [13-13] -> [14-14] will be deleted when delete_expired_stale_rowsets
  2. the delete bitmap of version 10~14, will do agg first, then update the agg result on verison 14 delete bitmap
  3. if update sucess, add the delete bitmap of version 10~13 to the queue which name is to_remove_vec
  4. when deleting delete bitmap on rowset [10-10] -> [11-11] -> [12-12] -> [13-13] -> [14-14], the delete bitmap which mention on step 3 will be deleted too.

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@hust-hhb
Copy link
Contributor Author

run buildall

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@hust-hhb hust-hhb force-pushed the remove-delete-bitmap branch from 121f7b1 to 497f711 Compare September 2, 2024 01:53
@hust-hhb
Copy link
Contributor Author

hust-hhb commented Sep 2, 2024

run buildall

Copy link
Contributor

github-actions bot commented Sep 2, 2024

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18236	4495	4319	4319
q2	2023	188	177	177
q3	11162	992	1062	992
q4	10159	694	809	694
q5	7748	2864	2859	2859
q6	229	139	136	136
q7	972	619	591	591
q8	9342	2089	2075	2075
q9	7289	6600	6572	6572
q10	7056	2229	2228	2228
q11	467	239	241	239
q12	401	226	220	220
q13	19006	3076	3040	3040
q14	280	228	229	228
q15	526	491	509	491
q16	616	507	497	497
q17	989	669	712	669
q18	7518	6845	6874	6845
q19	1413	1006	1078	1006
q20	707	331	340	331
q21	3979	3062	2956	2956
q22	1128	1060	1023	1023
Total cold run time: 111246 ms
Total hot run time: 38188 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4393	4291	4258	4258
q2	389	268	275	268
q3	2872	2655	2649	2649
q4	1927	1616	1617	1616
q5	5683	5668	5712	5668
q6	236	148	137	137
q7	2245	1826	1790	1790
q8	3280	3435	3535	3435
q9	8793	8745	8777	8745
q10	3545	3427	3379	3379
q11	635	499	495	495
q12	836	664	641	641
q13	14705	3150	3269	3150
q14	341	281	280	280
q15	534	509	504	504
q16	634	587	584	584
q17	1860	1553	1530	1530
q18	8269	7891	7996	7891
q19	1738	1575	1708	1575
q20	2215	1934	1890	1890
q21	5819	5440	5445	5440
q22	1083	1051	1033	1033
Total cold run time: 72032 ms
Total hot run time: 56958 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 191474 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 497f711cb2ff840249442a5526fc2efc46dc9cda, data reload: false

query1	1260	880	875	875
query2	6325	1964	1960	1960
query3	10584	3986	3990	3986
query4	59832	26182	23140	23140
query5	5404	505	488	488
query6	404	160	163	160
query7	5793	296	291	291
query8	288	205	206	205
query9	8995	2482	2471	2471
query10	494	262	268	262
query11	18267	15108	15522	15108
query12	166	103	103	103
query13	1564	386	377	377
query14	10639	7357	7402	7357
query15	228	173	174	173
query16	7385	477	454	454
query17	1099	562	576	562
query18	2081	290	289	289
query19	271	181	145	145
query20	119	107	110	107
query21	211	116	103	103
query22	4713	4501	4494	4494
query23	34273	33289	33419	33289
query24	5906	2900	2810	2810
query25	524	372	365	365
query26	674	154	151	151
query27	1784	278	275	275
query28	3616	2081	2057	2057
query29	667	398	401	398
query30	220	157	157	157
query31	932	765	768	765
query32	78	50	53	50
query33	471	294	291	291
query34	862	464	493	464
query35	843	744	724	724
query36	1051	933	945	933
query37	152	93	98	93
query38	3983	3989	3954	3954
query39	1432	1373	1401	1373
query40	207	118	119	118
query41	48	55	45	45
query42	123	97	97	97
query43	516	461	496	461
query44	1074	731	727	727
query45	197	168	162	162
query46	1096	719	749	719
query47	1929	1823	1800	1800
query48	379	288	291	288
query49	757	424	423	423
query50	835	417	407	407
query51	7298	7062	7120	7062
query52	98	88	87	87
query53	246	175	178	175
query54	575	444	480	444
query55	79	74	74	74
query56	270	251	257	251
query57	1183	1067	1069	1067
query58	210	237	220	220
query59	2985	2927	2764	2764
query60	291	272	261	261
query61	99	97	98	97
query62	742	661	657	657
query63	216	180	182	180
query64	2622	692	661	661
query65	3199	3143	3137	3137
query66	685	335	343	335
query67	15359	15328	15486	15328
query68	2976	569	590	569
query69	403	287	263	263
query70	1172	1066	1149	1066
query71	369	274	272	272
query72	5392	3735	2513	2513
query73	747	337	327	327
query74	9224	8758	8781	8758
query75	3327	2743	2684	2684
query76	1460	1037	1017	1017
query77	542	334	304	304
query78	9604	9090	9074	9074
query79	1035	548	526	526
query80	696	502	509	502
query81	460	233	237	233
query82	241	140	149	140
query83	168	152	147	147
query84	254	73	87	73
query85	672	285	276	276
query86	300	299	295	295
query87	4409	4265	4339	4265
query88	3160	2353	2345	2345
query89	379	287	293	287
query90	1905	198	187	187
query91	131	112	110	110
query92	62	52	55	52
query93	1045	551	536	536
query94	714	295	301	295
query95	402	255	254	254
query96	587	270	277	270
query97	3169	3082	3105	3082
query98	215	203	196	196
query99	1546	1276	1250	1250
Total cold run time: 303674 ms
Total hot run time: 191474 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.04
query2	0.08	0.04	0.04
query3	0.22	0.04	0.05
query4	1.68	0.08	0.07
query5	0.50	0.51	0.48
query6	1.13	0.74	0.74
query7	0.02	0.01	0.01
query8	0.05	0.04	0.04
query9	0.56	0.48	0.48
query10	0.54	0.53	0.53
query11	0.16	0.11	0.12
query12	0.16	0.12	0.12
query13	0.62	0.59	0.58
query14	2.09	2.04	2.10
query15	0.84	0.83	0.82
query16	0.37	0.36	0.35
query17	1.01	0.97	1.01
query18	0.21	0.20	0.20
query19	1.93	1.80	1.80
query20	0.01	0.01	0.01
query21	15.41	0.65	0.65
query22	4.41	6.93	1.82
query23	18.29	1.38	1.31
query24	2.05	0.23	0.25
query25	0.16	0.07	0.07
query26	0.27	0.17	0.18
query27	0.07	0.08	0.07
query28	13.18	1.01	0.98
query29	12.64	3.42	3.36
query30	0.24	0.05	0.05
query31	2.88	0.40	0.40
query32	3.24	0.48	0.48
query33	3.05	2.97	3.00
query34	16.94	4.40	4.42
query35	4.46	4.50	4.45
query36	0.66	0.48	0.47
query37	0.18	0.16	0.16
query38	0.16	0.14	0.14
query39	0.06	0.03	0.03
query40	0.16	0.12	0.13
query41	0.10	0.05	0.05
query42	0.06	0.05	0.05
query43	0.04	0.04	0.04
Total cold run time: 110.94 s
Total hot run time: 31.94 s

@hust-hhb
Copy link
Contributor Author

hust-hhb commented Sep 4, 2024

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

return Status::OK();
}

void CloudCumulativeCompaction::process_old_version_delete_bitmap() {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'process_old_version_delete_bitmap' has cognitive complexity of 63 (threshold 50) [readability-function-cognitive-complexity]

void CloudCumulativeCompaction::process_old_version_delete_bitmap() {
                                ^
Additional context

be/src/cloud/cloud_cumulative_compaction.cpp:361: +1, including nesting penalty of 0, nesting level increased to 1

    if (!pre_rowsets.empty()) {
    ^

be/src/cloud/cloud_cumulative_compaction.cpp:387: +2, including nesting penalty of 1, nesting level increased to 2

        do {
        ^

be/src/cloud/cloud_cumulative_compaction.cpp:388: +3, including nesting penalty of 2, nesting level increased to 3

            if (!new_delete_bitmap->empty()) {
            ^

be/src/cloud/cloud_cumulative_compaction.cpp:392: +4, including nesting penalty of 3, nesting level increased to 4

                DBUG_EXECUTE_IF("CloudCumulativeCompaction.modify_rowsets.get_mow_lock_failed", {
                ^

be/src/util/debug_points.h:36: expanded from macro 'DBUG_EXECUTE_IF'

    if (UNLIKELY(config::enable_debug_points)) {                              \
    ^

be/src/cloud/cloud_cumulative_compaction.cpp:392: +5, including nesting penalty of 4, nesting level increased to 5

                DBUG_EXECUTE_IF("CloudCumulativeCompaction.modify_rowsets.get_mow_lock_failed", {
                ^

be/src/util/debug_points.h:38: expanded from macro 'DBUG_EXECUTE_IF'

        if (dp) {                                                             \
        ^

be/src/cloud/cloud_cumulative_compaction.cpp:398: +4, including nesting penalty of 3, nesting level increased to 4

                if (get_st.ok()) {
                ^

be/src/cloud/cloud_cumulative_compaction.cpp:402: +4, including nesting penalty of 3, nesting level increased to 4

                if (!get_st.ok()) {
                ^

be/src/cloud/cloud_cumulative_compaction.cpp:411: +4, including nesting penalty of 3, nesting level increased to 4

                DBUG_EXECUTE_IF(
                ^

be/src/util/debug_points.h:36: expanded from macro 'DBUG_EXECUTE_IF'

    if (UNLIKELY(config::enable_debug_points)) {                              \
    ^

be/src/cloud/cloud_cumulative_compaction.cpp:411: +5, including nesting penalty of 4, nesting level increased to 5

                DBUG_EXECUTE_IF(
                ^

be/src/util/debug_points.h:38: expanded from macro 'DBUG_EXECUTE_IF'

        if (dp) {                                                             \
        ^

be/src/cloud/cloud_cumulative_compaction.cpp:417: +4, including nesting penalty of 3, nesting level increased to 4

                if (update_st.ok()) {
                ^

be/src/cloud/cloud_cumulative_compaction.cpp:421: +4, including nesting penalty of 3, nesting level increased to 4

                if (!update_st.ok()) {
                ^

be/src/cloud/cloud_cumulative_compaction.cpp:428: +4, including nesting penalty of 3, nesting level increased to 4

                DBUG_EXECUTE_IF("CloudCumulativeCompaction.modify_rowsets.remove_mow_lock_failed", {
                ^

be/src/util/debug_points.h:36: expanded from macro 'DBUG_EXECUTE_IF'

    if (UNLIKELY(config::enable_debug_points)) {                              \
    ^

be/src/cloud/cloud_cumulative_compaction.cpp:428: +5, including nesting penalty of 4, nesting level increased to 5

                DBUG_EXECUTE_IF("CloudCumulativeCompaction.modify_rowsets.remove_mow_lock_failed", {
                ^

be/src/util/debug_points.h:38: expanded from macro 'DBUG_EXECUTE_IF'

        if (dp) {                                                             \
        ^

be/src/cloud/cloud_cumulative_compaction.cpp:434: +4, including nesting penalty of 3, nesting level increased to 4

                if (remove_st.ok()) {
                ^

be/src/cloud/cloud_cumulative_compaction.cpp:438: +4, including nesting penalty of 3, nesting level increased to 4

                if (!remove_st.ok()) {
                ^

be/src/cloud/cloud_cumulative_compaction.cpp:448: +2, including nesting penalty of 1, nesting level increased to 2

        if (get_st.ok() && update_st.ok() && remove_st.ok()) {
        ^

be/src/cloud/cloud_cumulative_compaction.cpp:448: +1

        if (get_st.ok() && update_st.ok() && remove_st.ok()) {
                                          ^

be/src/cloud/cloud_cumulative_compaction.cpp:453: +3, including nesting penalty of 2, nesting level increased to 3

            for (auto it = new_delete_bitmap->delete_bitmap.begin();
            ^

return Status::OK();
}

void CloudCumulativeCompaction::process_old_version_delete_bitmap() {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'process_old_version_delete_bitmap' exceeds recommended size/complexity thresholds [readability-function-size]

void CloudCumulativeCompaction::process_old_version_delete_bitmap() {
                                ^
Additional context

be/src/cloud/cloud_cumulative_compaction.cpp:349: 110 lines including whitespace and comments (threshold 80)

void CloudCumulativeCompaction::process_old_version_delete_bitmap() {
                                ^

}
}

void MetaServiceImpl::remove_delete_bitmap_update_lock(
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'remove_delete_bitmap_update_lock' exceeds recommended size/complexity thresholds [readability-function-size]

void MetaServiceImpl::remove_delete_bitmap_update_lock(
                      ^
Additional context

cloud/src/meta-service/meta_service.cpp:2138: 95 lines including whitespace and comments (threshold 80)

void MetaServiceImpl::remove_delete_bitmap_update_lock(
                      ^

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.82% (9391/25502)
Line Coverage: 28.25% (77443/274096)
Region Coverage: 27.64% (39948/144531)
Branch Coverage: 24.29% (20333/83698)
Coverage Report: http://coverage.selectdb-in.cc/coverage/044a1ef1b607b71100ee5932045ab7a63ef7737d_044a1ef1b607b71100ee5932045ab7a63ef7737d/report/index.html

@hust-hhb
Copy link
Contributor Author

hust-hhb commented Sep 4, 2024

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

}
}

void MetaServiceImpl::remove_delete_bitmap_update_lock(
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'remove_delete_bitmap_update_lock' exceeds recommended size/complexity thresholds [readability-function-size]

void MetaServiceImpl::remove_delete_bitmap_update_lock(
                      ^
Additional context

cloud/src/meta-service/meta_service.cpp:2138: 101 lines including whitespace and comments (threshold 80)

void MetaServiceImpl::remove_delete_bitmap_update_lock(
                      ^

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.84% (9394/25502)
Line Coverage: 28.26% (77467/274096)
Region Coverage: 27.65% (39962/144531)
Branch Coverage: 24.30% (20335/83698)
Coverage Report: http://coverage.selectdb-in.cc/coverage/2e4871f5e08246682f2ab31c373c425b5303cdeb_2e4871f5e08246682f2ab31c373c425b5303cdeb/report/index.html

@hust-hhb
Copy link
Contributor Author

hust-hhb commented Sep 5, 2024

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

return Status::OK();
}

void CloudCumulativeCompaction::process_old_version_delete_bitmap() {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'process_old_version_delete_bitmap' has cognitive complexity of 63 (threshold 50) [readability-function-cognitive-complexity]

void CloudCumulativeCompaction::process_old_version_delete_bitmap() {
                                ^
Additional context

be/src/cloud/cloud_cumulative_compaction.cpp:362: +1, including nesting penalty of 0, nesting level increased to 1

    if (!pre_rowsets.empty()) {
    ^

be/src/cloud/cloud_cumulative_compaction.cpp:388: +2, including nesting penalty of 1, nesting level increased to 2

        do {
        ^

be/src/cloud/cloud_cumulative_compaction.cpp:389: +3, including nesting penalty of 2, nesting level increased to 3

            if (!new_delete_bitmap->empty()) {
            ^

be/src/cloud/cloud_cumulative_compaction.cpp:393: +4, including nesting penalty of 3, nesting level increased to 4

                DBUG_EXECUTE_IF("CloudCumulativeCompaction.modify_rowsets.get_mow_lock_failed", {
                ^

be/src/util/debug_points.h:36: expanded from macro 'DBUG_EXECUTE_IF'

    if (UNLIKELY(config::enable_debug_points)) {                              \
    ^

be/src/cloud/cloud_cumulative_compaction.cpp:393: +5, including nesting penalty of 4, nesting level increased to 5

                DBUG_EXECUTE_IF("CloudCumulativeCompaction.modify_rowsets.get_mow_lock_failed", {
                ^

be/src/util/debug_points.h:38: expanded from macro 'DBUG_EXECUTE_IF'

        if (dp) {                                                             \
        ^

be/src/cloud/cloud_cumulative_compaction.cpp:399: +4, including nesting penalty of 3, nesting level increased to 4

                if (get_st.ok()) {
                ^

be/src/cloud/cloud_cumulative_compaction.cpp:403: +4, including nesting penalty of 3, nesting level increased to 4

                if (!get_st.ok()) {
                ^

be/src/cloud/cloud_cumulative_compaction.cpp:412: +4, including nesting penalty of 3, nesting level increased to 4

                DBUG_EXECUTE_IF(
                ^

be/src/util/debug_points.h:36: expanded from macro 'DBUG_EXECUTE_IF'

    if (UNLIKELY(config::enable_debug_points)) {                              \
    ^

be/src/cloud/cloud_cumulative_compaction.cpp:412: +5, including nesting penalty of 4, nesting level increased to 5

                DBUG_EXECUTE_IF(
                ^

be/src/util/debug_points.h:38: expanded from macro 'DBUG_EXECUTE_IF'

        if (dp) {                                                             \
        ^

be/src/cloud/cloud_cumulative_compaction.cpp:418: +4, including nesting penalty of 3, nesting level increased to 4

                if (update_st.ok()) {
                ^

be/src/cloud/cloud_cumulative_compaction.cpp:422: +4, including nesting penalty of 3, nesting level increased to 4

                if (!update_st.ok()) {
                ^

be/src/cloud/cloud_cumulative_compaction.cpp:429: +4, including nesting penalty of 3, nesting level increased to 4

                DBUG_EXECUTE_IF("CloudCumulativeCompaction.modify_rowsets.remove_mow_lock_failed", {
                ^

be/src/util/debug_points.h:36: expanded from macro 'DBUG_EXECUTE_IF'

    if (UNLIKELY(config::enable_debug_points)) {                              \
    ^

be/src/cloud/cloud_cumulative_compaction.cpp:429: +5, including nesting penalty of 4, nesting level increased to 5

                DBUG_EXECUTE_IF("CloudCumulativeCompaction.modify_rowsets.remove_mow_lock_failed", {
                ^

be/src/util/debug_points.h:38: expanded from macro 'DBUG_EXECUTE_IF'

        if (dp) {                                                             \
        ^

be/src/cloud/cloud_cumulative_compaction.cpp:435: +4, including nesting penalty of 3, nesting level increased to 4

                if (remove_st.ok()) {
                ^

be/src/cloud/cloud_cumulative_compaction.cpp:439: +4, including nesting penalty of 3, nesting level increased to 4

                if (!remove_st.ok()) {
                ^

be/src/cloud/cloud_cumulative_compaction.cpp:449: +2, including nesting penalty of 1, nesting level increased to 2

        if (get_st.ok() && update_st.ok() && remove_st.ok()) {
        ^

be/src/cloud/cloud_cumulative_compaction.cpp:449: +1

        if (get_st.ok() && update_st.ok() && remove_st.ok()) {
                                          ^

be/src/cloud/cloud_cumulative_compaction.cpp:454: +3, including nesting penalty of 2, nesting level increased to 3

            for (auto it = new_delete_bitmap->delete_bitmap.begin();
            ^

return Status::OK();
}

void CloudCumulativeCompaction::process_old_version_delete_bitmap() {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function 'process_old_version_delete_bitmap' exceeds recommended size/complexity thresholds [readability-function-size]

void CloudCumulativeCompaction::process_old_version_delete_bitmap() {
                                ^
Additional context

be/src/cloud/cloud_cumulative_compaction.cpp:350: 110 lines including whitespace and comments (threshold 80)

void CloudCumulativeCompaction::process_old_version_delete_bitmap() {
                                ^

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.84% (9394/25502)
Line Coverage: 28.26% (77467/274096)
Region Coverage: 27.65% (39962/144531)
Branch Coverage: 24.30% (20338/83698)
Coverage Report: http://coverage.selectdb-in.cc/coverage/ee9e052dabadaa49b4627d9b582422d0330de9b2_ee9e052dabadaa49b4627d9b582422d0330de9b2/report/index.html

@hust-hhb
Copy link
Contributor Author

hust-hhb commented Sep 8, 2024

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.85% (9382/25463)
Line Coverage: 28.22% (77384/274215)
Region Coverage: 27.62% (39953/144675)
Branch Coverage: 24.25% (20334/83844)
Coverage Report: http://coverage.selectdb-in.cc/coverage/abf164d441a3843d0b9baea91c7a21438dd0054a_abf164d441a3843d0b9baea91c7a21438dd0054a/report/index.html

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.30% (9590/25710)
Line Coverage: 28.68% (79255/276338)
Region Coverage: 28.16% (41042/145768)
Branch Coverage: 24.77% (20899/84382)
Coverage Report: http://coverage.selectdb-in.cc/coverage/ea5f6e48320a69a0fa5074d77e97aef6364f759a_ea5f6e48320a69a0fa5074d77e97aef6364f759a/report/index.html

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 Sep 20, 2024
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

@dataroaring dataroaring merged commit 7681850 into apache:master Sep 20, 2024
23 of 28 checks passed
dataroaring pushed a commit that referenced this pull request Sep 20, 2024
…en cumulative compaction is done (#40204)

When the count of delete bitmap is big, it may lead to high cpu use
rate, we can merge old version delete bitmap to reduce the count of
delete bitmap when cumulative compaction is done to reduce the use rate
of cpu.
Here is an example:
before cu compaciton ,rowset layout is

    "cumulative point": 10,
    "rowsets": [
"[0-1] 0 DATA NONOVERLAPPING
0200000000000000ffffffffffffffecffffffffffffffff 0",
"[2-9] 1 DATA NONOVERLAPPING
0200000000002cc1a8447a4e0ba5850f773803ae2d534284 1.21 KB",
"[10-10] 1 DATA NONOVERLAPPING
0200000000002d07a8447a4e0ba5850f773803ae2d534284 1.09 KB",
"[11-11] 1 DATA NONOVERLAPPING
0200000000002d14a8447a4e0ba5850f773803ae2d534284 1.10 KB",
"[12-12] 1 DATA NONOVERLAPPING
0200000000002d23a8447a4e0ba5850f773803ae2d534284 1.10 KB",
"[13-13] 1 DATA NONOVERLAPPING
0200000000002d33a8447a4e0ba5850f773803ae2d534284 1.10 KB",
"[14-14] 1 DATA NONOVERLAPPING
0200000000002d40a8447a4e0ba5850f773803ae2d534284 1.10 KB"
    ],
base rowset is [2-9], now cu compaciton input rowset range is [10-14],
after compaciton, rowset layout is

    "cumulative point": 10,
    "rowsets": [
"[0-1] 0 DATA NONOVERLAPPING
0200000000000000ffffffffffffffecffffffffffffffff 0",
"[2-9] 1 DATA NONOVERLAPPING
0200000000002cc1a8447a4e0ba5850f773803ae2d534284 1.21 KB",
"[10-14] 1 DATA NONOVERLAPPING
0200000000002d63a8447a4e0ba5850f773803ae2d534284 1.21 KB"
    ],
1. the delete bitmap of rowset [10-10] -> [11-11] -> [12-12] -> [13-13]
-> [14-14] will be deleted when delete_expired_stale_rowsets
2. the delete bitmap of version 10~14, will do agg first, then update
the agg result on verison 14 delete bitmap
3. if update sucess, add the delete bitmap of version 10~13 to the queue
which name is to_remove_vec
4. when deleting delete bitmap on rowset [10-10] -> [11-11] -> [12-12]
-> [13-13] -> [14-14], the delete bitmap which mention on step 3 will be
deleted too.
dataroaring pushed a commit that referenced this pull request Oct 31, 2024
…itmap when doing cu compaction (#42471)

pr #40204 support deleting old
version delete bitmap when doing cu compaction, it a new function and
better to add a config to enable it or not.
dataroaring pushed a commit that referenced this pull request Nov 7, 2024
…it when processing old version delete bitmap on cu compaction (#42379)

pr #40204 support deleting old
version delete bitmap when doing cu compaction, it will update delete
bitmap with agg result, then deleting old version delete bitmap.
Updating delete bitmap means overwriting existing keys, however delete
bitmap may split into multiple kvs to store in fdb, so we should delete
the existing keys and rewrite it to fdb instead of overwriting directly.
dataroaring pushed a commit that referenced this pull request Nov 12, 2024
…itmap when doing cu compaction (#43615)

pr #40204 support deleting old
version delete bitmap when doing cu compaction, it a new function and
better to add a config to enable it or not.
pick pr:#42471
dataroaring pushed a commit that referenced this pull request Nov 21, 2024
…on delete bitmap (#44300)

### What problem does this PR solve?

Related PR: #40204

Problem Summary:
pr #40204 support removing old delete bitmap, however it donesn't
consider boundary which will lead to miss some delete bitmap should be
removed on be , it only affect local delete bitmap, the delete bitmap
store in fdb is right, and these missing delete bitmaps can only be
deleted by next base compaciton before this pr.
dataroaring pushed a commit that referenced this pull request Nov 26, 2024
…on delete bitmap (#44448)

Problem Summary:
pr #40204 support removing old
delete bitmap, however it donesn't consider boundary which will lead to
miss some delete bitmap should be removed on be , it only affect local
delete bitmap, the delete bitmap store in fdb is right, and these
missing delete bitmaps can only be deleted by next base compaciton
before this pr.
pick pr:#44300
dataroaring pushed a commit that referenced this pull request Nov 26, 2024
…ode (#44410)


Related PR: #40204

Problem Summary:
There is some implicit conversion loses like uint64_t to uint32_t on mow
code, this pr fix it.
github-actions bot pushed a commit that referenced this pull request Nov 26, 2024
…ode (#44410)


Related PR: #40204

Problem Summary:
There is some implicit conversion loses like uint64_t to uint32_t on mow
code, this pr fix it.
dataroaring pushed a commit that referenced this pull request Dec 3, 2024
1. check every delete bitmap in MS belongs to a visible rowset
2. check that #40204 works as
expected
github-actions bot pushed a commit that referenced this pull request Dec 3, 2024
1. check every delete bitmap in MS belongs to a visible rowset
2. check that #40204 works as
expected
zhannngchen pushed a commit that referenced this pull request Dec 10, 2024
…ulative compaction is done on local mode (#41636)

pr #40204 remove delete bitmap on
cloud mode, this pr is used for local mode
hubgeter pushed a commit to hubgeter/doris that referenced this pull request Mar 12, 2025
…itmap when doing cu compaction (apache#42471)

pr apache#40204 support deleting old
version delete bitmap when doing cu compaction, it a new function and
better to add a config to enable it or not.
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.2-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants