[
https://issues.apache.org/jira/browse/SOLR-16597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17652068#comment-17652068
]
Shawn Heisey commented on SOLR-16597:
-------------------------------------
I came up with a far less invasive patch. I created another constructor for
SolrNamedThreadFactory that includes a boolean, then used that constructor in
all the SolrClient implementations (except EmbeddedSolrServer).
I wonder whether it might be a good idea to deprecate the existing constructor
and begin migrating usages to the new one. There are a LOT of usages.
I suspect that we could see faster shutdown times if some of the long-running
thread pools in Solr were changed to Daemon and cleanup left up to Java. That
would have to be VERY carefully investigated and implemented.
> Give Solr executors a config option to use daemon threads
> ---------------------------------------------------------
>
> Key: SOLR-16597
> URL: https://issues.apache.org/jira/browse/SOLR-16597
> Project: Solr
> Issue Type: Task
> Security Level: Public(Default Security Level. Issues are Public)
> Affects Versions: 9.1
> Reporter: Shawn Heisey
> Assignee: Shawn Heisey
> Priority: Major
>
> Http2SolrClient, using the Jetty httpclient creates threads that are not
> Daemon threads. If the main method exits without closing the SolrClient,
> those threads stay running and so the program never ends.
> The old HttpSolrClient, using Apache httpclient, works as expected, so I
> think that http client is likely creating daemon threads.
> Talking with the Jetty project, I learned there is a way to have those
> threads created as daemon threads. The pool object has a "setDaemon" method.
> But I have not been able to figure out how to access the pool object to set
> that parameter. I was informed that our executor wrappers lack the
> configuration option to do this.
> This issue is where I will figure out how to make this aspect of an executor
> configurable and implement it so Http2SolrClient works as expected. If
> somebody can point me in the right direction, I would greatly appreciate it.
> I do not want to have our executor always create Daemon threads ... that
> should be configurable, and default to false as the current code does.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]