LUCENE-2666: add assert

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1001420 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2010-09-26 12:46:20 +00:00
parent 671a63fb49
commit cddf318f8c
1 changed files with 2 additions and 0 deletions

View File

@ -750,6 +750,8 @@ public class SegmentReader extends IndexReader implements Cloneable {
if (deletedDocsDirty) { // re-write deleted
si.advanceDelGen();
assert deletedDocs.length() == si.docCount;
// We can write directly to the actual name (vs to a
// .tmp & renaming it) because the file is not live
// until segments file is written: