You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Michael Garski (JIRA)" <ji...@apache.org> on 2009/11/18 04:58:39 UTC
[jira] Created: (LUCENENET-279)
TestIndexWriter.TestExceptionOnMergeInit hangs
TestIndexWriter.TestExceptionOnMergeInit hangs
----------------------------------------------
Key: LUCENENET-279
URL: https://issues.apache.org/jira/browse/LUCENENET-279
Project: Lucene.Net
Issue Type: Bug
Reporter: Michael Garski
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.
[jira] Commented: (LUCENENET-279)
TestIndexWriter.TestExceptionOnMergeInit hangs
Posted by "Michael Garski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779498#action_12779498 ]
Michael Garski commented on LUCENENET-279:
------------------------------------------
It doesn't fail in Java as the argument can be null depending on the collection implementation while in .NET it will always throw an exception.
> 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.
[jira] Updated: (LUCENENET-279)
TestIndexWriter.TestExceptionOnMergeInit hangs
Posted by "Michael Garski (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Commented: (LUCENENET-279)
TestIndexWriter.TestExceptionOnMergeInit hangs
Posted by "Andrei Iliev (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779435#action_12779435 ]
Andrei Iliev commented on LUCENENET-279:
----------------------------------------
Thanks Michael,
I did it in same way in 2.9.0, so I think it is a right patch. But the same question as in LUCENENET-260 remains: Why doesn't fail Java Lucene with the same code?
> 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.
[jira] Commented: (LUCENENET-279)
TestIndexWriter.TestExceptionOnMergeInit hangs
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779515#action_12779515 ]
Digy commented on LUCENENET-279:
--------------------------------
mergingSegments is declared as "HashSet" in java and adding or removing null element in HashSet is completely legal.
DIGY
> 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.
[jira] Resolved: (LUCENENET-279)
TestIndexWriter.TestExceptionOnMergeInit hangs
Posted by "Digy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENENET-279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Digy resolved LUCENENET-279.
----------------------------
Resolution: Fixed
Thanks Michael, good catch.
patch applied.
> 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.