spaces-X commented on code in PR #10548: URL: https://github.com/apache/doris/pull/10548#discussion_r912741730
########## be/src/olap/tablet_meta.cpp: ########## @@ -710,4 +742,106 @@ bool operator!=(const TabletMeta& a, const TabletMeta& b) { return !(a == b); } +DeleteBitmap::DeleteBitmap() { +} + +DeleteBitmap::DeleteBitmap(const DeleteBitmap& o) { + delete_bitmap = o.delete_bitmap; // just copy data +} + +DeleteBitmap& DeleteBitmap::operator=(const DeleteBitmap& o) { + delete_bitmap = o.delete_bitmap; // just copy data + return *this; +} + +DeleteBitmap::DeleteBitmap(DeleteBitmap&& o) { + delete_bitmap = std::move(o.delete_bitmap); +} + +DeleteBitmap& DeleteBitmap::operator=(DeleteBitmap&& o) { + delete_bitmap = std::move(o.delete_bitmap); + return *this; +} + +DeleteBitmap DeleteBitmap::snapshot() const { + std::shared_lock l(lock); + return DeleteBitmap(*this); +} + +void DeleteBitmap::add(const BitmapKey& bitmap, uint32_t row_id) { + std::lock_guard l(lock); Review Comment: It looks like the granularity of the lock is tablet level. I wonder will there be a performance penalty for this part of serial update when loading concurrently that need to update multiple versions of bitmaps? -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org