You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/09/06 11:58:23 UTC

[GitHub] [doris] zhannngchen commented on a diff in pull request #12364: [feature-wip](unique-key-merge-on-write) update delete bitmap when increamental clone

zhannngchen commented on code in PR #12364:
URL: https://github.com/apache/doris/pull/12364#discussion_r963612695


##########
be/src/olap/tablet.cpp:
##########
@@ -2047,6 +2052,26 @@ void Tablet::_rowset_ids_difference(const RowsetIdUnorderedSet& cur,
     }
 }
 
+// The caller should hold _rowset_update_lock and _meta_lock lock.
+Status Tablet::update_delete_bitmap_without_lock(const RowsetSharedPtr& rowset) {
+    int64_t cur_version = rowset->start_version();
+    std::vector<segment_v2::SegmentSharedPtr> segments;
+    _load_rowset_segments(rowset, &segments);
+
+    DeleteBitmapPtr delete_bitmap = std::make_shared<DeleteBitmap>(tablet_id());
+    RETURN_IF_ERROR(calc_delete_bitmap(rowset->rowset_id(), segments, nullptr, delete_bitmap,
+                                       cur_version - 1, true));
+
+    for (auto iter = delete_bitmap->delete_bitmap.begin();

Review Comment:
   Can we use the DeleteBitmap::merge method directly? As well as in another update_delete_bitmap method?



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org