[ https://issues.apache.org/jira/browse/LUCENE-1554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless resolved LUCENE-1554. ---------------------------------------- Resolution: Fixed Fix Version/s: 2.9 I couldn't get the test to fail, but I can see one code path (if mergeInit hits an exception) that would trip the assert incorrectly, so I committed that fix. Thanks Scott! > 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 > Fix For: 2.9 > > > 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-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org