LUCENE-1554: remove false-positive assert that may (rarely) trip when it's not supposed to

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@750849 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2009-03-06 11:22:12 +00:00
parent ebb8c8ec3d
commit 11079efed4
1 changed files with 10 additions and 8 deletions

View File

@ -4427,14 +4427,16 @@ public class IndexWriter {
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;
// It's possible we are called twice, eg if there was an
// exception inside mergeInit
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;
}
}
/** Does the actual (time-consuming) work of the merge,