HoustonPutman commented on code in PR #2960: URL: https://github.com/apache/solr/pull/2960#discussion_r1929053426
########## solr/core/src/java/org/apache/solr/search/EarlyTerminatingCollector.java: ########## @@ -29,11 +30,15 @@ */ public class EarlyTerminatingCollector extends FilterCollector { + private final int chunkSize = 100; // Check across threads only at a chunk size + private final int maxDocsToCollect; private int numCollected = 0; private int prevReaderCumulativeSize = 0; private int currentReaderSize = 0; + private final AtomicInteger pendingDocsToCollect; Review Comment: Agreed, it looks like the chunking can go away if we switch to a LongAdder. Much like the chunking implementation, we won't get absolute accuracy across threads, but we will get higher throughput. (And we could sacrifice throughput to increase accuracy if we wanted to, but I doubt we do) -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org