Skip to content

Commit

Permalink
Add merge_mow_delete_bitmap_when_compaction config
Browse files Browse the repository at this point in the history
  • Loading branch information
liulijia committed Sep 30, 2024
1 parent fab285c commit 853922f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions be/src/common/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1192,6 +1192,8 @@ DEFINE_mInt64(tablet_meta_serialize_size_limit, "1610612736");
DEFINE_Validator(tablet_meta_serialize_size_limit,
[](const int64_t config) -> bool { return config < 1717986918; });

DEFINE_mBool(merge_mow_delete_bitmap_when_compaction, "false")

// clang-format off
#ifdef BE_TEST
// test s3
Expand Down
2 changes: 2 additions & 0 deletions be/src/common/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,8 @@ DECLARE_mBool(ignore_schema_change_check);

DECLARE_mInt64(tablet_meta_serialize_size_limit);

DECLARE_mBool(merge_mow_delete_bitmap_when_compaction);

#ifdef BE_TEST
// test s3
DECLARE_String(test_s3_resource);
Expand Down
5 changes: 4 additions & 1 deletion be/src/olap/tablet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3832,7 +3832,10 @@ void Tablet::calc_compaction_output_rowset_delete_bitmap(
for (auto iter = subset_map.delete_bitmap.begin();
iter != subset_map.delete_bitmap.end(); ++iter) {
auto cur_version = std::get<2>(iter->first);
auto output_version = cur_version < min_version ? min_version : cur_version;
auto output_version = cur_version;
if (config::merge_mow_delete_bitmap_when_compaction && cur_version < min_version) {
output_version = min_version;
}
size_t size = 0;
for (auto index = iter->second.begin(); index != iter->second.end(); ++index) {
src.row_id = *index;
Expand Down

0 comments on commit 853922f

Please sign in to comment.