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

Yonik Seeley commented on SOLR-4872:
------------------------------------

bq. If schemas are shared in a container, how do we decide when to close down 
the analyzers in them?

No analysis components in core Lucene/Solr need to explicitly release resources 
AFAIK, so it's a rather new issue (and perhaps very rare?)

One random idea: Maybe you could use a finalizer on your custom factory?  This 
may or may not work depending on the nature of the cleanup you need to do - 
finalizers are tricky.

Another idea: do cleanup when whole core-container is closed, not individual 
cores.  Whether this would work or not again depends on the nature of the 
resources being freed I guess.

                
> Allow schema analysis object factories to be cleaned up properly when the 
> core shuts down
> -----------------------------------------------------------------------------------------
>
>                 Key: SOLR-4872
>                 URL: https://issues.apache.org/jira/browse/SOLR-4872
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 4.3
>            Reporter: Benson Margulies
>         Attachments: solr-4872.patch, solr-4872.patch
>
>
> I have a need, in an TokenizerFactory or TokenFilterFactory, to have a shared 
> cache that is cleaned up when the core is torn down. 
> There is no 'close' protocol on these things, and Solr rejects analysis 
> components that are SolrCoreAware. 
> Possible solutions:
> # add a close protocol to these factories and make sure it gets called at 
> core shutdown.
> # allow these items to be 'core-aware'.
> # invent some notion of 'schema-lifecycle-aware'.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to