gavinchou commented on code in PR #23572:
URL: https://github.com/apache/doris/pull/23572#discussion_r1307146894


##########
be/src/olap/rowset/segment_v2/bitmap_index_reader.cpp:
##########
@@ -32,10 +32,19 @@
 namespace doris {
 namespace segment_v2 {
 
-Status BitmapIndexReader::load(bool use_page_cache, bool kept_in_memory) {
-    const IndexedColumnMetaPB& dict_meta = _bitmap_index_meta->dict_column();
-    const IndexedColumnMetaPB& bitmap_meta = 
_bitmap_index_meta->bitmap_column();
-    _has_null = _bitmap_index_meta->has_null();
+Status BitmapIndexReader::load(bool use_page_cache, bool kept_in_memory,
+                               const BitmapIndexPB* index_meta) {
+    // TODO yyq: implement a new once flag to avoid status construct.
+    return _load_once.call([this, use_page_cache, kept_in_memory, index_meta] {

Review Comment:
   ```c++
   static Status st = Status::ERR;
   static std::once_flag once;
   std::call_once(once, [this, use_page_cache, kept_in_memory, index_meta] {
       st = _load(use_page_cache, kept_in_memory, index_meta);
   });
   return st;
   ```



-- 
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