[
https://issues.apache.org/jira/browse/SOLR-16597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17652070#comment-17652070
]
Shawn Heisey commented on SOLR-16597:
-------------------------------------
The patch solves the immediate issue that I was having -- a quick and dirty
program to make a simple query to Solr would never exit if I didn't close the
Http2SolrClient. Switching to HttpSolrClient allowed the program to exit
without the cleanup.
I know that some will tell me I always need to do proper cleanup. I think that
quick and dirty programs should be able to let Java handle that.
> 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]