noblepaul commented on code in PR #2248:
URL: https://github.com/apache/solr/pull/2248#discussion_r1557281550
##########
solr/core/src/java/org/apache/solr/core/CoreContainer.java:
##########
@@ -445,6 +447,17 @@ public CoreContainer(NodeConfig config, CoresLocator
locator, boolean asyncSolrC
cfg.getIndexSearcherExecutorThreads(), // thread count
cfg.getIndexSearcherExecutorThreads(), // queue size
new SolrNamedThreadFactory("searcherCollector"));
+ ((ExecutorUtil.MDCAwareThreadPoolExecutor)
collectorExecutor).setRejectedExecutionHandler(new RejectedExecutionHandler() {
Review Comment:
> The "caller runs" behavior I meant could be done via an ExecutorService
delegate that catches RejectedException and simply runs the Runnable.
I don't think "caller runs" is a good solution. If there are multiple
rejected tasks because all threads are busy, the caller thread can only run one
task, what will happen to the other tasks? Meanwhile the already completed
tasks may free up other threads. So, IMHO, the current code with a bigger queue
count should be fine
--
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]