mirror of https://github.com/apache/lucene.git
LUCENE-1376: catch BG merge exceptions even if all merges finish before FG thread (running optimize) advances to while loop
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@691964 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e6dcf14620
commit
e398f4e930
|
@ -2333,9 +2333,7 @@ public class IndexWriter {
|
|||
|
||||
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 @@ public class IndexWriter {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (optimizeMergesPending())
|
||||
doWait();
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue