SOLR-3620: check if shutdown after wait so that any threads that were waiting bail rather than starting a recovery

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1361805 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-07-15 21:30:13 +00:00
parent cc395993e3
commit c16f3f75bc
1 changed files with 5 additions and 0 deletions

View File

@ -137,6 +137,11 @@ public final class DefaultSolrCoreState extends SolrCoreState {
recoveryLock.wait(1000);
} catch (InterruptedException e) {
}
// check again for those that were waiting
if (cc.isShutDown()) {
log.warn("Skipping recovery because Solr is shutdown");
return;
}
if (closed) return;
}