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: [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]