mirror of https://github.com/apache/lucene.git
SOLR-4602: ZkController#unregister should cancel it's election participation before asking the Overseer to delete the SolrCore information.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1457584 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
42dd280c97
commit
720ded1e46
|
@ -153,6 +153,9 @@ Bug Fixes
|
||||||
* SOLR-4599: CachingDirectoryFactory calls close(Directory) on forceNew if the
|
* SOLR-4599: CachingDirectoryFactory calls close(Directory) on forceNew if the
|
||||||
Directory has a refCnt of 0, but it should call closeDirectory(CacheValue).
|
Directory has a refCnt of 0, but it should call closeDirectory(CacheValue).
|
||||||
(Mark Miller)
|
(Mark Miller)
|
||||||
|
|
||||||
|
* SOLR-4602: ZkController#unregister should cancel it's election participation
|
||||||
|
before asking the Overseer to delete the SolrCore information. (Mark Miller)
|
||||||
|
|
||||||
Optimizations
|
Optimizations
|
||||||
----------------------
|
----------------------
|
||||||
|
|
|
@ -1021,17 +1021,17 @@ public final class ZkController {
|
||||||
|
|
||||||
public void unregister(String coreName, CoreDescriptor cd)
|
public void unregister(String coreName, CoreDescriptor cd)
|
||||||
throws InterruptedException, KeeperException {
|
throws InterruptedException, KeeperException {
|
||||||
ZkNodeProps m = new ZkNodeProps(Overseer.QUEUE_OPERATION,
|
|
||||||
"deletecore", ZkStateReader.CORE_NAME_PROP, coreName,
|
|
||||||
ZkStateReader.NODE_NAME_PROP, getNodeName(),
|
|
||||||
ZkStateReader.COLLECTION_PROP, cd.getCloudDescriptor().getCollectionName());
|
|
||||||
overseerJobQueue.offer(ZkStateReader.toJSON(m));
|
|
||||||
|
|
||||||
final String zkNodeName = getCoreNodeName(cd);
|
final String zkNodeName = getCoreNodeName(cd);
|
||||||
ElectionContext context = electionContexts.remove(zkNodeName);
|
ElectionContext context = electionContexts.remove(zkNodeName);
|
||||||
if (context != null) {
|
if (context != null) {
|
||||||
context.cancelElection();
|
context.cancelElection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ZkNodeProps m = new ZkNodeProps(Overseer.QUEUE_OPERATION,
|
||||||
|
"deletecore", ZkStateReader.CORE_NAME_PROP, coreName,
|
||||||
|
ZkStateReader.NODE_NAME_PROP, getNodeName(),
|
||||||
|
ZkStateReader.COLLECTION_PROP, cd.getCloudDescriptor().getCollectionName());
|
||||||
|
overseerJobQueue.offer(ZkStateReader.toJSON(m));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createCollection(String collection) throws KeeperException,
|
public void createCollection(String collection) throws KeeperException,
|
||||||
|
|
Loading…
Reference in New Issue