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

Egor Pahomov commented on SOLR-3594:
------------------------------------

I'll tell you the reason. We create Core. It's create Searcher. Usually it 
registers it, and when we close core, core closes the searcher. But if we 
couldn't(because of data race) register searcher, we wouldn't able to find it 
and close. So we would have 1 search opening and 0 closing. So test would fail. 
I really can't understand, why we wouldn't wait for searcher to register. It's 
so natural. We do it in commit, why we shouldn't do it in SolrCore()? It's 
quite easy - my patch proves it. and we have predictable state of core. other 
case we just looses one searcher and saying it's not even a problem. May be in 
this case we shouldn't count searcher closers and  openings. 

It reminds me of an old soviet joke:
On nude beach:"comrade Rabinovich, or take of your cross, or put on your 
pants".    
                
> SolrCore() doesn't wait SolrCore.getSearcher() to register _searcher
> --------------------------------------------------------------------
>
>                 Key: SOLR-3594
>                 URL: https://issues.apache.org/jira/browse/SOLR-3594
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 3.4
>            Reporter: Egor Pahomov
>            Priority: Minor
>              Labels: test
>         Attachments: 3594.patch, testSearchersManagement.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> SolrCore() executes SolrCore.getSearcher(...) and returns without checking if 
> getSearcher(...) already registered _searcher. As result: if we have 
> SolrEventListener with slow newSearcher(), we can end test before _searcher 
> registered and get then searcher closes and searcher opens doesn't match. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to