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

Michael Garski updated LUCENENET-279:
-------------------------------------

    Attachment: LUCENENET-279.patch

I found the root cause and have a patch.

The test hangs with runningMerges.Count > 0 when the writer is closed as in 
MergeFinish after looping through all of the sourceSegments the mergingSegments 
collection is empty and the call after the loop finishes to 
mergingSegments.Remove(merge.info) causes an exception to be thrown due to 
merge.info being null so that the call to runningMerges.Remove(merge) is never 
made.

Small change to check for null before attempting to remove from mergingSegments

> TestIndexWriter.TestExceptionOnMergeInit hangs
> ----------------------------------------------
>
>                 Key: LUCENENET-279
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-279
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Michael Garski
>         Attachments: LUCENENET-279.patch
>
>
> The patch in LUCENENET-257 causes the assertion to pass 
> [Assert.IsTrue(w.failed);], however the following call to w.Close() now hangs 
> due to runningMerges.Count > 0.  Comparing to Java version and will post a 
> patch shortly.

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