[ 
https://issues.apache.org/jira/browse/SOLR-14423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17100106#comment-17100106
 ] 

Andrzej Bialecki commented on SOLR-14423:
-----------------------------------------

I created a PR with the initial attempt at fixing this:
 * {{CoreContainer.solrClientCache}} is initialized on {{load()}} and closed on 
{{shutdown()}}
 * I modified the StreamHandler, GraphHandler, ReindexCollectionCmd, ColStatus, 
SolrReporter and a few other places to use this instance.
 * probably the most controversial change is in the 
{{org.apache.solr.handler.sql.CalciteSolrDriver}} and {{SolrSchema}} / 
{{SolrTable}}. These objects are initialized in a way that makes it very 
difficult to pass an existing instance of SolrClientCache. For this reason I 
decided to create a single instance of the cache in {{SolrSchema}} and manage 
its lifecycle through the {{Connection}} - which required adding a wrapper to 
intercept the {{Connection.close()}} call. [~jbernste] I would appreciate your 
feedback.
 * I also added an instance of {{CoreContainer.objectCache}} - this is not 
strictly required by the other changes but it illustrates how we could use a 
single generic object cache at the CC level instead of adding many specialized 
accessors like the one for SolrClientCache. We can decide which way to go in 
the future.

> static caches in StreamHandler ought to move to CoreContainer lifecycle
> -----------------------------------------------------------------------
>
>                 Key: SOLR-14423
>                 URL: https://issues.apache.org/jira/browse/SOLR-14423
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: streaming expressions
>            Reporter: David Smiley
>            Assignee: Andrzej Bialecki
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> StreamHandler (at "/stream") has several statically declared caches.  I think 
> this is problematic, such as in testing wherein multiple nodes could be in 
> the same JVM.  One of them is more serious -- SolrClientCache which is 
> closed/cleared via a SolrCore close hook.  That's bad for performance but 
> also dangerous since another core might want to use one of these clients!
> CC [~jbernste]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to