jpountz commented on PR #14922:
URL: https://github.com/apache/lucene/pull/14922#issuecomment-3064796630

   @benwtrent A problem with this patch is that it hides bugs on the caller 
side if they pass a `upTo` that is greater than `offset + bitSet.length()` and 
this iterator has matches in this range of doc IDs.
   
   Looking at the stack trace of the failure, I think that I understand the 
problem now:
    - `DocIdSetIterator#intoBitSet` only operates on docs that match this 
iterator, so it's fine if `upTo > offset + bitSet.length()` as long as this 
iterator doesn't return docs in this range.
    - On dense blocks, `DocIdSetIterator#intoBitSet` delegates to 
`FixedBitSet#orRange`. This other API looks similar, except that it OR's all 
the bits, whether they are set or not. So it's a bug when the source range of 
bits to OR is greater than the destination range.
   
   So we probably need to fix `DENSE#intoBitSetWithinBlock` to adjust the range 
of bits to copy based on the destination bit set, and then ensure that the 
source bit set has no set bit between the last OR'ed bit and `upTo`.


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