snleee commented on a change in pull request #4051: Fix the race condition for 
real-time inverted index reader
URL: https://github.com/apache/incubator-pinot/pull/4051#discussion_r271129476
 
 

 ##########
 File path: 
pinot-core/src/main/java/org/apache/pinot/core/operator/filter/BitmapBasedFilterOperator.java
 ##########
 @@ -78,27 +76,14 @@ protected FilterBlock getNextBlock() {
 
     int[] dictIds = _exclusive ? _predicateEvaluator.getNonMatchingDictIds() : 
_predicateEvaluator.getMatchingDictIds();
 
-    // For realtime use case, it is possible that inverted index has not yet 
generated for the given dict id, so we
-    // filter out null bitmaps
     InvertedIndexReader invertedIndex = _dataSource.getInvertedIndex();
     int length = dictIds.length;
-    List<ImmutableRoaringBitmap> bitmaps = new ArrayList<>(length);
-    for (int dictId : dictIds) {
-      ImmutableRoaringBitmap bitmap = (ImmutableRoaringBitmap) 
invertedIndex.getDocIds(dictId);
-      if (bitmap != null) {
-        bitmaps.add(bitmap);
-      }
+    ImmutableRoaringBitmap[] bitmaps = new ImmutableRoaringBitmap[length];
 
 Review comment:
   +1 for this change..

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to