add asserts

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1060872 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2011-01-19 17:21:49 +00:00
parent b2cad88aad
commit bc23b9f4d3
1 changed files with 2 additions and 0 deletions

View File

@ -229,7 +229,9 @@ class BufferedDeletes {
if (mergedDeletes == null) {
mergedDeletes = getDeletes(segmentInfos.info(firstIdx-1));
numTerms.addAndGet(-mergedDeletes.numTermDeletes.get());
assert numTerms.get() >= 0;
bytesUsed.addAndGet(-mergedDeletes.bytesUsed.get());
assert bytesUsed.get() >= 0;
}
mergedDeletes.update(deletes, true);