Thx Shawn!

> If they're sleeping, then it's unlikely that there's any real contribution to 
> system load.
I know, but

> seeing threads you didn't expect to see?
exactly this

> You should really be keeping one SolrClient per server node, 
>and indicating which core to access with each request
Due to the different timeouts (querying or updating) I think there should be at 
least two ...

> indicating which core to access with each request
e.g.? What I do for example when querying: 
SolrClient solrClient = getSolrClient( coreName );
SolrQuery solrQuery = new SolrQuery();
...
QueryResponse response = solrClient.query( solrQuery );
...
If I omit the core in the url upon creation of the SolrClient, where can I then 
"indicate" the core?

> I do see a builder class for it
my fault

Thx again
- Clemens


-----Ursprüngliche Nachricht-----
Von: Shawn Heisey <apa...@elyograg.org> 
Gesendet: Sonntag, 21. Oktober 2018 19:13
An: solr-user@lucene.apache.org
Betreff: Re: 6.6 -> 7.5 SolrJ, seeing many "Connection evictor"-Threads

On 10/21/2018 10:13 AM, Clemens Wyss DEV wrote:
> Just upgrading from 6.6 to 7.5 and am now seeing many "Connection 
> evcitor"-threads which are all Thread.slee()ing ...

What's the stacktrace on those threads?  If they're sleeping, then it's 
unlikely that there's any real contribution to system load.

Are you having problems, or just seeing threads you didn't expect to see?

> As of 6.6 I am keeping the SolrClients (one per core) in a HashMap. Is this 
> ok or should I create a new SolrClient for each request I am doing?

You should really be keeping one SolrClient per server node, and indicating 
which core to access with each request.  One client object can access every 
core on a node.  You do have to drop the core name from the URL.

> as I have querying and updating requests I'd like to make use of 
> ConcurrentUpdateSolrClient for updating requests. But 
> ConcurrentUpdateSolrClient does not seem to have the same fluent 
> builder API

ConcurrentUpdateSolrClient swallows exceptions -- if there's a problem during 
indexing, your program will never know about it.  If you need error handling, 
you'll need to use HttpSolrClient and handle multiple indexing threads in your 
own code.  If it's OK with you to not have any error handling, then 
ConcurrentUpdateSolrClient can work very well.

I do see a builder class for it:

http://lucene.apache.org/solr/7_5_0/solr-solrj/index.html?org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.html

Thanks,
Shawn

Reply via email to