gaobinlong commented on code in PR #15795:
URL: https://github.com/apache/lucene/pull/15795#discussion_r2916909985


##########
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:
   I've refactored the code to make it memory efficient for concurrent search 
case, please take a look, thanks!



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

Reply via email to