gf2121 commented on code in PR #14552:
URL: https://github.com/apache/lucene/pull/14552#discussion_r2074894820


##########
lucene/core/src/java/org/apache/lucene/index/ReadersAndUpdates.java:
##########
@@ -526,6 +540,60 @@ public int nextDoc() throws IOException {
       } while (hasValue == false);
       return docIDOut;
     }
+
+    @Override
+    public void intoBitSet(int upTo, FixedBitSet bitSet, int offset) throws 
IOException {
+      if (onDiskDocValues == null) {
+        super.intoBitSet(upTo, bitSet, offset);
+        return;
+      }
+
+      // we need a scratch bitset because the param bitset doesn't allow bits 
to be cleared.
+      if (scratch == null || scratch.length() < upTo - offset) {

Review Comment:
   +1, nice catch!



-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to