corecursion commented on code in PR #15015:
URL: https://github.com/apache/lucene/pull/15015#discussion_r2245953747


##########
lucene/core/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java:
##########
@@ -671,6 +670,7 @@ protected synchronized MergeThread 
getMergeThread(MergeSource mergeSource, OneMe
     final MergeThread thread = new MergeThread(mergeSource, merge);
     thread.setDaemon(true);
     thread.setName("Lucene Merge Thread #" + mergeThreadCounter++);
+    mergeThreads.add(thread);

Review Comment:
   This one line that adds a thread to the `mergeThreads` collection is moved 
inside the `getMergeThread()` function, making that function symmetric with the 
`removeMergeThread()` function that removes a thread from `mergeThreads`.



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

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

Reply via email to