gaobinlong commented on code in PR #15795:
URL: https://github.com/apache/lucene/pull/15795#discussion_r2893476636
##########
lucene/misc/src/java/org/apache/lucene/misc/search/MemoryAccountingBitsetCollector.java:
##########
@@ -40,7 +40,7 @@ public MemoryAccountingBitsetCollector(CollectorMemoryTracker
tracker) {
@Override
protected void doSetNextReader(LeafReaderContext context) throws IOException
{
docBase = context.docBase;
- length += context.reader().maxDoc();
+ length = docBase + context.reader().maxDoc();
Review Comment:
This change works for both single-thread case and concurrency search case,
the original code doesn't work for concurrency search case since length always
starts from 0 for each collector.
--
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]