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

Kay Kay commented on SOLR-915:
------------------------------

The version that I had initially was to just launch the threads for closeHooks 
( excluding the CountDownLatch , so SolrCore::close() returns after invoking 
all the hooks ). 

As far as the behavior of SolrCore::close() 
1) do we want  the guarantee that the closehooks are called for the same in 
separate threads and eventually execute, or 
2) do we also want the guarantee that the closehooks have completed as well. 


As far as the Executor is concerned - the motivation is that , other potential 
new threads / existing threads ( I could see 4 instances of new Thread() { 
}.start() in the code ) can use a common executor so that the executor handles 
the cleanup / reuse of thread from the thread pools. While the thread pool 
policy might vary - it would be useful to have as minimum executors as possible 
to be re-used in other cases as well. 

> 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.

Reply via email to