-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix DISIDocIdStream::count so that it does not try to count beyond max #14522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Did it fail with an existing query/collector, or did you find it while trying to take advantage of DocIdStream
for a new use-case?
We see
I'm not yet able to reproduce with Elasticsearch, but it seems very likely to be the root cause of some of the failures we're seeing. |
#14522) Fix DISIDocIdStream::count so that it does not try to count beyond max. From the perspective of DISIDocIdStream it should not be necessary to check the iterator position before calling count.
#14522) Fix DISIDocIdStream::count so that it does not try to count beyond max. From the perspective of DISIDocIdStream it should not be necessary to check the iterator position before calling count.
apache#14522) Fix DISIDocIdStream::count so that it does not try to count beyond max. From the perspective of DISIDocIdStream it should not be necessary to check the iterator position before calling count.
Fix
DISIDocIdStream::count
so that it does not try to count beyond max.From the perspective of DISIDocIdStream it should not be necessary to check the iterator position before calling
count
.Without this fix,
DISIDocIdStream::count
can easily fail with IOOBE, e.g.