mirror of https://github.com/apache/lucene.git
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:
parent
ebb8c8ec3d
commit
11079efed4
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue