[ 
https://issues.apache.org/jira/browse/LUCENE-2820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael McCandless reopened LUCENE-2820:
----------------------------------------


This is causing deadlock in some tests!

> CMS fails to cleanly stop threads
> ---------------------------------
>
>                 Key: LUCENE-2820
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2820
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2820.patch
>
>
> When you close IW, it waits for (or aborts and then waits for) all running 
> merges.
> However, it's wait criteria is wrong -- it waits for the threads to be done 
> w/ their merges, not for the threads to actually die.
> CMS already has a sync() method, to wait for running threads, which we can 
> call from CMS.close.  However it has a thread hazard because a MergeThread 
> removes itself from mergeThreads before it actually exits.  So sync() is able 
> to return even while a merge thread is still running.
> This was uncovered by LUCENE-2819 on the test case 
> TestCustomScoreQuery.testCustomExternalQuery, though I expect other test 
> cases would show it.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to