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


##########
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:
   Does this mean we're creating a maxDoc-length FixedBitSet for every thread?  
I wonder if there's a way of being more memory efficient here?



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