mirror of https://github.com/apache/lucene.git
SOLR-4421: On CoreContainer shutdown, all SolrCores should publish their state as DOWN.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1444249 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e729e57a8e
commit
806ab343c6
|
@ -146,6 +146,9 @@ Other Changes
|
|||
|
||||
* SOLR-4384: Make post.jar report timing information (Upayavira via janhoy)
|
||||
|
||||
* SOLR-4421: On CoreContainer shutdown, all SolrCores should publish their
|
||||
state as DOWN. (Mark Miller)
|
||||
|
||||
================== 4.1.0 ==================
|
||||
|
||||
Versions of Major Components
|
||||
|
|
|
@ -743,6 +743,7 @@ public class CoreContainer
|
|||
isShutDown = true;
|
||||
|
||||
if (isZooKeeperAware()) {
|
||||
publishCoresAsDown();
|
||||
cancelCoreRecoveries();
|
||||
}
|
||||
try {
|
||||
|
@ -783,6 +784,20 @@ public class CoreContainer
|
|||
}
|
||||
}
|
||||
|
||||
private void publishCoresAsDown() {
|
||||
synchronized (cores) {
|
||||
for (SolrCore core : cores.values()) {
|
||||
try {
|
||||
zkController.publish(core.getCoreDescriptor(), ZkStateReader.DOWN);
|
||||
} catch (KeeperException e) {
|
||||
log.error("", e);
|
||||
} catch (InterruptedException e) {
|
||||
log.error("", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void cancelCoreRecoveries() {
|
||||
ArrayList<SolrCoreState> coreStates = new ArrayList<SolrCoreState>();
|
||||
synchronized (cores) {
|
||||
|
|
Loading…
Reference in New Issue