lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (LUCENE-1554) Problem with IndexWriter.mergeFinish
Date Thu, 05 Mar 2009 23:11:56 GMT

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

Michael McCandless reassigned LUCENE-1554:
------------------------------------------

    Assignee: Michael McCandless

> Problem with IndexWriter.mergeFinish
> ------------------------------------
>
>                 Key: LUCENE-1554
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1554
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 2.4
>            Reporter: Scott Garland
>            Assignee: Michael McCandless
>
> I'm getting a (very) infrequent assert in IndexWriter.mergeFinish from TestIndexWriter.testAddIndexOnDiskFull.
The problem occurs during the rollback when the merge hasn't been registered. I'm not 100%
sure this is the correct fix, because it's such an infrequent event. 
> {code:java}
>   final synchronized void mergeFinish(MergePolicy.OneMerge merge) throws IOException
{
>     
>     // Optimize, addIndexes or finishMerges may be waiting
>     // on merges to finish.
>     notifyAll();
>     if (merge.increfDone)
>       decrefMergeSegments(merge);
>     assert merge.registerDone;
>     final SegmentInfos sourceSegments = merge.segments;
>     final int end = sourceSegments.size();
>     for(int i=0;i<end;i++)
>       mergingSegments.remove(sourceSegments.info(i));
>     mergingSegments.remove(merge.info);
>     merge.registerDone = false;
>   }
> {code}
> Should  be something like:
> {code:java}
>   final synchronized void mergeFinish(MergePolicy.OneMerge merge) throws IOException
{
>     
>     // Optimize, addIndexes or finishMerges may be waiting
>     // on merges to finish.
>     notifyAll();
>     if (merge.increfDone)
>       decrefMergeSegments(merge);
>     if (merge.registerDone) {
>       final SegmentInfos sourceSegments = merge.segments;
>       final int end = sourceSegments.size();
>       for(int i=0;i<end;i++)
>         mergingSegments.remove(sourceSegments.info(i));
>       mergingSegments.remove(merge.info);
>       merge.registerDone = false;
>     }
>   }
> {code}

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message