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


##########
lucene/misc/src/java/org/apache/lucene/misc/search/MemoryAccountingBitsetCollector.java:
##########
@@ -24,23 +24,46 @@
 import org.apache.lucene.search.SimpleCollector;
 import org.apache.lucene.util.FixedBitSet;
 
-/** Bitset collector which supports memory tracking */
+/**
+ * Bitset collector which supports memory tracking. Can operate in two modes: 
Full index mode:
+ * allocates bitset for entire index (for single-threaded search), 
Segment-local mode: allocates
+ * bitset only for segments processed (memory-efficient for concurrent search)
+ */
 public class MemoryAccountingBitsetCollector extends SimpleCollector {
 
   final CollectorMemoryTracker tracker;
+  final boolean segmentLocal;

Review Comment:
   I mean if we only keep the concurrent case, the collector won't be used for 
single-thread search case, the implementation of single-thread case is 
different from the concurrent case, so the old code with using the 
single-thread search in user's repo won't work. Is this concern valid?



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