remove dead code; make assert verbose

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1393437 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2012-10-03 11:40:27 +00:00
parent cb40231513
commit 1e05df4461

View File

@ -2335,10 +2335,9 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {
assert !infos.contains(info): "dup info dir=" + info.info.dir + " name=" + info.info.name; assert !infos.contains(info): "dup info dir=" + info.info.dir + " name=" + info.info.name;
String newSegName = newSegmentName(); String newSegName = newSegmentName();
String dsName = info.info.name;
if (infoStream.isEnabled("IW")) { if (infoStream.isEnabled("IW")) {
infoStream.message("IW", "addIndexes: process segment origName=" + info.info.name + " newName=" + newSegName + " dsName=" + dsName + " info=" + info); infoStream.message("IW", "addIndexes: process segment origName=" + info.info.name + " newName=" + newSegName + " info=" + info);
} }
IOContext context = new IOContext(new MergeInfo(info.info.getDocCount(), info.info.sizeInBytes(), true, -1)); IOContext context = new IOContext(new MergeInfo(info.info.getDocCount(), info.info.sizeInBytes(), true, -1));
@ -3955,7 +3954,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {
synchronized(this) { synchronized(this) {
assert lastCommitChangeCount <= changeCount; assert lastCommitChangeCount <= changeCount: "lastCommitChangeCount=" + lastCommitChangeCount + " changeCount=" + changeCount;
if (pendingCommitChangeCount == lastCommitChangeCount) { if (pendingCommitChangeCount == lastCommitChangeCount) {
if (infoStream.isEnabled("IW")) { if (infoStream.isEnabled("IW")) {