cpoerschke commented on code in PR #2236:
URL: https://github.com/apache/solr/pull/2236#discussion_r1474418474
##########
solr/core/src/java/org/apache/solr/core/SolrCore.java:
##########
@@ -2056,8 +2056,10 @@ public UpdateHandler getUpdateHandler() {
private final ArrayDeque<RefCounted<SolrIndexSearcher>> _searchers = new
ArrayDeque<>();
private final ArrayDeque<RefCounted<SolrIndexSearcher>> _realtimeSearchers =
new ArrayDeque<>();
+ // Single threaded pool, with a time-to-keep of 60 seconds
final ExecutorService searcherExecutor =
- ExecutorUtil.newMDCAwareSingleThreadExecutor(new
SolrNamedThreadFactory("searcherExecutor"));
+ ExecutorUtil.newMDCAwareSingleLazyThreadExecutor(
+ new SolrNamedThreadFactory("searcherExecutor"));
Review Comment:
minor: mentioning the 60s in the comment shows/assumes
`newMDCAwareSingleLazyThreadExecutor` implementation detail, could potentially
avoid that (and allow other future use) by adding arguments to the method/call
e.g.
```suggestion
new SolrNamedThreadFactory("searcherExecutor"), 60L,
TimeUnit.SECONDS);
```
--
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]