mirror of https://github.com/apache/lucene.git
stop indexwriter waits on close
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1419665 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a0ccd37bb1
commit
81a14f54cd
|
@ -116,7 +116,7 @@ public abstract class CachingDirectoryFactory extends DirectoryFactory {
|
|||
while(val.refCnt != 0) {
|
||||
wait(100);
|
||||
|
||||
if (cnt++ >= 12000) {
|
||||
if (cnt++ >= 1200) {
|
||||
log.error("Timeout waiting for all directory ref counts to be released");
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -84,8 +84,12 @@ public final class DefaultSolrCoreState extends SolrCoreState implements Recover
|
|||
|
||||
while (pauseWriter) {
|
||||
try {
|
||||
writerPauseLock.wait();
|
||||
writerPauseLock.wait(100);
|
||||
} catch (InterruptedException e) {}
|
||||
|
||||
if (closed) {
|
||||
throw new RuntimeException("Already closed");
|
||||
}
|
||||
}
|
||||
|
||||
if (indexWriter == null) {
|
||||
|
@ -128,8 +132,12 @@ public final class DefaultSolrCoreState extends SolrCoreState implements Recover
|
|||
log.info("Waiting until IndexWriter is unused... core=" + coreName);
|
||||
while (!writerFree) {
|
||||
try {
|
||||
writerPauseLock.wait();
|
||||
writerPauseLock.wait(100);
|
||||
} catch (InterruptedException e) {}
|
||||
|
||||
if (closed) {
|
||||
throw new RuntimeException("Already closed");
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue