goingforstudying-ctrl commented on code in PR #16889:
URL: https://github.com/apache/lucene/pull/16889#discussion_r4525277252


##########
lucene/core/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java:
##########
@@ -636,6 +636,17 @@ protected synchronized boolean maybeStall(MergeSource 
mergeSource) {
       doStall();
     }
 
+    if (mergeThreads.contains(Thread.currentThread()) && 
mergeSource.hasPendingMerges() == false) {

Review Comment:
   Done in 6c8b1c5. maybeStall now returns false inside the cap loop when the 
merge queue is empty, right after the merge-thread check. The flushing thread 
no longer stalls while merge threads sit on the latch.
   



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