From ff2779566613253fa2c6bfe099f8a3033f4e2a19 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Mon, 24 Jan 2011 16:56:58 +0000 Subject: [PATCH] add verbosity git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1062876 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/lucene/index/IndexWriter.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lucene/src/java/org/apache/lucene/index/IndexWriter.java b/lucene/src/java/org/apache/lucene/index/IndexWriter.java index 18eb5a23777..e746427eec9 100644 --- a/lucene/src/java/org/apache/lucene/index/IndexWriter.java +++ b/lucene/src/java/org/apache/lucene/index/IndexWriter.java @@ -333,7 +333,6 @@ public class IndexWriter implements Closeable { * @throws IOException */ IndexReader getReader() throws IOException { - ensureOpen(); final long tStart = System.currentTimeMillis(); @@ -1049,8 +1048,9 @@ public class IndexWriter implements Closeable { private void closeInternal(boolean waitForMerges) throws CorruptIndexException, IOException { try { - if (infoStream != null) - message("now flush at close"); + if (infoStream != null) { + message("now flush at close waitForMerges=" + waitForMerges); + } docWriter.close(); @@ -2020,12 +2020,19 @@ public class IndexWriter implements Closeable { * will have completed once this method completes.

*/ public synchronized void waitForMerges() { + if (infoStream != null) { + message("waitForMerges"); + } while(pendingMerges.size() > 0 || runningMerges.size() > 0) { doWait(); } // sanity check assert 0 == mergingSegments.size(); + + if (infoStream != null) { + message("waitForMerges done"); + } } /**