Skip to content

Commit 32315ac

Browse files
committed
[fix](mow) check delete bitmap version
1 parent 12d2aaa commit 32315ac

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

be/src/cloud/cloud_meta_mgr.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,17 @@ Status CloudMetaMgr::sync_tablet_delete_bitmap(CloudTablet* tablet, int64_t old_
944944
DeleteBitmapPtr new_delete_bitmap = std::make_shared<DeleteBitmap>(tablet->tablet_id());
945945
*delete_bitmap = *new_delete_bitmap;
946946
}
947+
948+
if (read_version == 2 && config::delete_bitmap_store_write_version == 1) {
949+
return Status::InternalError(
950+
"please set delete_bitmap_store_read_version to 1 or 3 because "
951+
"delete_bitmap_store_write_version is 1");
952+
} else if (read_version == 1 && config::delete_bitmap_store_write_version == 2) {
953+
return Status::InternalError(
954+
"please set delete_bitmap_store_read_version to 2 or 3 because "
955+
"delete_bitmap_store_write_version is 2");
956+
}
957+
947958
int64_t new_max_version = std::max(old_max_version, rs_metas.rbegin()->end_version());
948959
// When there are many delete bitmaps that need to be synchronized, it
949960
// may take a longer time, especially when loading the tablet for the

0 commit comments

Comments
 (0)