lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r691964 - /lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java
Date Thu, 04 Sep 2008 11:14:06 GMT
Author: mikemccand
Date: Thu Sep  4 04:14:04 2008
New Revision: 691964

URL: http://svn.apache.org/viewvc?rev=691964&view=rev
Log:
LUCENE-1376: catch BG merge exceptions even if all merges finish before FG thread (running
optimize) advances to while loop

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

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java?rev=691964&r1=691963&r2=691964&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java Thu Sep  4 04:14:04
2008
@@ -2333,9 +2333,7 @@
 
     if (doWait) {
       synchronized(this) {
-        while(optimizeMergesPending()) {
-          doWait();
-
+        while(true) {
           if (mergeExceptions.size() > 0) {
             // Forward any exceptions in background merge
             // threads to the current thread:
@@ -2351,6 +2349,11 @@
               }
             }
           }
+
+          if (optimizeMergesPending())
+            doWait();
+          else
+            break;
         }
       }
 



Mime
View raw message