yiguolei commented on code in PR #19101:
URL: https://github.com/apache/doris/pull/19101#discussion_r1199599330
##########
be/src/util/bitmap_value.h:
##########
@@ -1876,14 +1912,27 @@ class BitmapValue {
return result;
}
+ void _prepare_bitmap_for_write() {
+ if (!_bitmap) {
+ _bitmap = std::make_shared<detail::Roaring64Map>();
+ return;
+ }
+
+ if (_bitmap.use_count() > 1) {
Review Comment:
感觉这里用use count 可能不太好,不如记录一个标记位,比如is_owner 这样的,然后再copy constructor
还有operator=的时候,都把is_owner 设置为false;prepare for write的时候,设置为true。
--
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]