dataroaring commented on code in PR #53908:
URL: https://github.com/apache/doris/pull/53908#discussion_r2287152270


##########
be/src/cloud/cloud_full_compaction.cpp:
##########
@@ -356,8 +356,25 @@ Status 
CloudFullCompaction::_cloud_full_compaction_update_delete_bitmap(int64_t
                                                                       
delete_bitmap));
         }
     }
-    RETURN_IF_ERROR(_engine.meta_mgr().update_delete_bitmap(*cloud_tablet(), 
-1, initiator,
-                                                            
delete_bitmap.get()));
+    auto delete_bitmap_size = delete_bitmap->delete_bitmap.size();
+    DeleteBitmapPtr delete_bitmap_v2 = 
std::make_shared<DeleteBitmap>(*delete_bitmap);
+    if (config::delete_bitmap_store_version >= 2) {
+        std::vector<std::pair<RowsetId, int64_t>> 
pre_rowset_ids_to_segment_num;
+        for (const auto& [rowset_version, rowset_ptr] : 
cloud_tablet()->rowset_map()) {
+            if (rowset_version.second < _output_rowset->start_version() ||
+                rowset_version.first > _output_rowset->end_version()) {
+                pre_rowset_ids_to_segment_num.emplace_back(
+                        std::make_pair(rowset_ptr->rowset_id(), 
rowset_ptr->num_segments()));
+            }
+        }
+        _tablet->tablet_meta()->delete_bitmap().subset(
+                pre_rowset_ids_to_segment_num, 
_input_rowsets.front()->start_version(),
+                _input_rowsets.back()->end_version(), delete_bitmap_v2.get());
+    }

Review Comment:
   same as code in cloud_tablet.cpp afer line 1217. Maybe can let it as a 
static method of cloud tablet and call it here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to