You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2011/01/24 17:56:58 UTC

svn commit: r1062876 - /lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/IndexWriter.java

Author: mikemccand
Date: Mon Jan 24 16:56:58 2011
New Revision: 1062876

URL: http://svn.apache.org/viewvc?rev=1062876&view=rev
Log:
add verbosity

Modified:
    lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/IndexWriter.java

Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/IndexWriter.java?rev=1062876&r1=1062875&r2=1062876&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/IndexWriter.java Mon Jan 24 16:56:58 2011
@@ -333,7 +333,6 @@ public class IndexWriter implements Clos
    * @throws IOException
    */
   IndexReader getReader() throws IOException {
-
     ensureOpen();
 
     final long tStart = System.currentTimeMillis();
@@ -1049,8 +1048,9 @@ public class IndexWriter implements Clos
   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 Clos
    *    will have completed once this method completes.</p>
    */
   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");
+    }
   }
 
   /**