CaptainDredge opened a new issue, #13079: URL: https://github.com/apache/lucene/issues/13079
### Description `numQueuedFlushes()` is a blocking function which gets called in `DocumentWriter#preUpdate()` to check if there are any queued flushes. If `checkPendingFlushOnUpdate` is disabled i.e. its false then the overall condition `flushControl.numQueuedFlushes() > 0 && config.checkPendingFlushOnUpdate` could be short circuited if we reverse the check to `config.checkPendingFlushOnUpdate && flushControl.numQueuedFlushes() > 0`. This will prevent a blocking call. Code pointer: https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/index/DocumentsWriter.java#L387 Currently while benchmarking I can see this particular issue significantly contributing to locking of write threads which is increasing indexing latency. <img width="917" alt="Screenshot 2024-02-06 at 12 58 51 PM" src="https://github.com/apache/lucene/assets/20185657/05e6a52d-0811-443b-8637-43e47c67dc6c"> -- 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...@lucene.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org