LUCENE-2918: fix thread safety bug w/ assert statement

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1075443 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2011-02-28 17:38:33 +00:00
parent 1337e9f1df
commit 0e86125124
1 changed files with 2 additions and 2 deletions

View File

@ -3199,10 +3199,10 @@ public class IndexWriter implements Closeable {
final SegmentReader clone = (SegmentReader) reader.clone(true);
merge.readerClones.add(clone);
if (reader.numDocs() > 0) {
if (clone.numDocs() > 0) {
merger.add(clone);
totDocCount += clone.numDocs();
}
totDocCount += clone.numDocs();
segUpto++;
}