blob: c03fcfb67299eaf06af417efb660b2b85b818fbf [file] [log] [blame]
Index: src/java/org/apache/lucene/index/IndexWriter.java
===================================================================
--- src/java/org/apache/lucene/index/IndexWriter.java (revision 691951)
+++ src/java/org/apache/lucene/index/IndexWriter.java (working copy)
@@ -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;
}
}