yiguolei commented on code in PR #19101:
URL: https://github.com/apache/doris/pull/19101#discussion_r1199599453
##########
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:
如果is owner == true,就直接return了。 我觉得一个bool 的判断效率要比 shared ptr use count 高
--
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]