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

Michael McCandless commented on LUCENE-3476:
--------------------------------------------


OK, mulling on this some more.... I don't think we should go to such
great lengths to remove the sync'd from swapSearcher.

That sync is harmless in practice (it's uncontended unless the app
screws up and calls .close while another thread is calling
.maybeReopen), and the changes necessary to make it truly lockless
makes SearcherManager's code quite a bit more complex.

Don't get me wrong: it's an impressive feat of concurrent programming
to make swapSearcher lock-free, but just because you can remove a sync
doesn't mean you should.

But we should still fix the original issue, for those apps that do
mess up: can't we simply move the swapSearcher inside the
try/finally/success?

                
> SearcherManager misses to close IR if manager is closed during reopen
> ---------------------------------------------------------------------
>
>                 Key: LUCENE-3476
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3476
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/store
>    Affects Versions: 3.5, 4.0
>            Reporter: Simon Willnauer
>            Assignee: Simon Willnauer
>             Fix For: 3.5, 4.0
>
>         Attachments: LUCENE-3476.patch
>
>
> if we close SM while there is a thread calling maybReopen() and swapSearcher 
> throws already closed exception we miss to close the searcher / reader.

--
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to