SOLR-4592: DefaultSolrCoreState#doRecovery needs to check the CoreContainer shutdown flag inside the recoveryLock sync block.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1457199 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2013-03-16 04:06:05 +00:00
parent f4cf5ead7d
commit 87a6c98b7c
2 changed files with 9 additions and 0 deletions

View File

@ -131,6 +131,9 @@ Bug Fixes
* SOLR-4311: Admin UI - Optimize Caching Behaviour (steffkes)
* SOLR-4592: DefaultSolrCoreState#doRecovery needs to check the CoreContainer
shutdown flag inside the recoveryLock sync block. (Mark Miller)
Optimizations
----------------------

View File

@ -207,12 +207,18 @@ public final class DefaultSolrCoreState extends SolrCoreState implements Recover
return;
}
// check before we grab the lock
if (cc.isShutDown()) {
log.warn("Skipping recovery because Solr is shutdown");
return;
}
synchronized (recoveryLock) {
// to be air tight we must also check after lock
if (cc.isShutDown()) {
log.warn("Skipping recovery because Solr is shutdown");
return;
}
log.info("Running recovery - first canceling any ongoing recovery");
cancelRecovery();