From cddf318f8c5902467010ed600f82bfec3168f502 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Sun, 26 Sep 2010 12:46:20 +0000 Subject: [PATCH] LUCENE-2666: add assert git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1001420 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/src/java/org/apache/lucene/index/SegmentReader.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lucene/src/java/org/apache/lucene/index/SegmentReader.java b/lucene/src/java/org/apache/lucene/index/SegmentReader.java index 95e4999e736..3b71ab64c34 100644 --- a/lucene/src/java/org/apache/lucene/index/SegmentReader.java +++ b/lucene/src/java/org/apache/lucene/index/SegmentReader.java @@ -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: