mirror of https://github.com/apache/lucene.git
throw CorruptIndexException when deleted docs bit vector size does not match segment info size
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@898469 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
260d294111
commit
aba4c8bed4
|
@ -610,6 +610,9 @@ public class SegmentReader extends IndexReader implements Cloneable {
|
|||
deletedDocs = new BitVector(directory(), si.getDelFileName());
|
||||
deletedDocsRef = new AtomicInteger(1);
|
||||
assert checkDeletedCounts();
|
||||
if (deletedDocs.size() != si.docCount) {
|
||||
throw new CorruptIndexException("document count mismatch: deleted docs count " + deletedDocs.size() + " vs segment doc count " + si.docCount);
|
||||
}
|
||||
} else
|
||||
assert si.getDelCount() == 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue