[
https://issues.apache.org/jira/browse/SOLR-16597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17654521#comment-17654521
]
Kevin Risden commented on SOLR-16597:
-------------------------------------
So I'm against this change. I didn't know why at first but just had a bad
feeling that daemon threads do stuff we probably don't want. I did some
research and found these two references.
Some background on daemon threads:
* https://www.baeldung.com/java-daemon-thread
* https://stackoverflow.com/a/2213443
I think it makes sense that if you open a client you should close the client.
Any other usage is invalid.
> 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
> Attachments: SOLR-16597.patch
>
>
> 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]