lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan McKinley (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-915) SolrCore;close() - scope to exploit parallelism among the number of closeHooks
Date Tue, 16 Dec 2008 18:10:44 GMT

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

Ryan McKinley commented on SOLR-915:
------------------------------------

sorry, i should have said, "I have no objection to changing List -> Collection"

So this issue is really about changing the semantics of closeHook -- you are suggesting changing
the meaning so that it is just a notification, not code inserted in the shutdown cycle.

To me, the existing logic makes the most sense -- the close hook is called when the core shuts
down; after core.close() returns you know that all the hooks have been called.  In the case
where you want to fire a long running process, the close hook can start its own thread.  


The existing process makes *both* options possible, the way you are proposing forces everyone
to run the hook asynchronously (even existing code that assumes it won't be).

I am -1 on a change like that...


> SolrCore;close()  - scope to exploit parallelism among the number of closeHooks 
> --------------------------------------------------------------------------------
>
>                 Key: SOLR-915
>                 URL: https://issues.apache.org/jira/browse/SOLR-915
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>         Environment: Tomcat 6, JRE 6
>            Reporter: Kay Kay
>            Assignee: Ryan McKinley
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-915.patch, SOLR-915.patch, SOLR-915.patch
>
>   Original Estimate: 96h
>  Remaining Estimate: 96h
>
> In SolrCore: close() - all the way towards the end of the function - there seems to be
a sequential list of close method invocation. 
>     if( closeHooks != null ) {
>        for( CloseHook hook : closeHooks ) {
>          hook.close( this );
>       }
>     }
> I believe this has scope to be parallelized ( actually the entire sequence of close operations
, updateHandler,close() etc.) - by means of launching them in separate threads from an ExecutorService
, for a much faster shutdown as the process definitely does not need to be sequential. 
> This becomes all the more important in the multi-core context when we might want to shutdown
and restart a SolrCore altogether. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message