LUCENE-6098: change to a hard check

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1643591 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2014-12-06 19:26:06 +00:00
parent df4a217d15
commit f75d3c5dc4
1 changed files with 3 additions and 1 deletions

View File

@ -4253,7 +4253,9 @@ public class IndexWriter implements Closeable, TwoPhaseCommit, Accountable {
synchronized(this) {
assert lastCommitChangeCount <= changeCount: "lastCommitChangeCount=" + lastCommitChangeCount + " changeCount=" + changeCount;
if (lastCommitChangeCount > changeCount) {
throw new IllegalStateException("lastCommitChangeCount=" + lastCommitChangeCount + ",changeCount=" + changeCount);
}
if (pendingCommitChangeCount == lastCommitChangeCount) {
if (infoStream.isEnabled("IW")) {