You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Benson Margulies (JIRA)" <ji...@apache.org> on 2013/06/13 23:15:20 UTC

[jira] [Comment Edited] (SOLR-4872) Allow schema analysis object factories to be cleaned up properly when the core shuts down

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

Benson Margulies edited comment on SOLR-4872 at 6/13/13 9:13 PM:
-----------------------------------------------------------------

Yonik,

This sort of travels around full circle in the exchange of views between Hoss and Rob.

For the top-level factory components, I have to agree. They are few in number and so having them carry finalizers around would be pretty painless.

For individual objects of shorter lifetime, finalizers are more of a problem.

In any case, what I really want to know is if you are objecting to my patch. I don't want to do the work to finish it if you, or anyone else, is going to -1 it into limbo. 

Here's an argument by analogy: why bother to have CoreAware on the solrconfig side? All those handler objects are similarly few in number and could have finalizers, but someone felt that it was important for them to be explicitly aware of the core lifecycle. My idea here is to correspondingly make the schema objects aware of the schema lifecycle.

                
      was (Author: bmargulies):
    Yonik,

This sort of travels around full circle in the exchange of views between Hoss and Rob.

For the top-level factory components, I have to agree. They are few in number and so having them carry finalizers around would be pretty painless.

For individual objects of shorter lifetime, finalizers are more of a problem.

In any case, what I really want to know is if you are objecting to my patch. I don't want to do the work to finish it if you, or anyone else, is going to -1 it into limbo. 

Here's an argument by analogy: bother to have CoreAware on the solrconfig side? All those handler objects are similarly few in number and could have finalizers, but someone felt that it was important for them to be explicitly aware of the core lifecycle. My idea here is to correspondingly make the schema objects aware of the schema lifecycle.

                  
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org