You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2016/03/01 18:06:47 UTC
[04/50] [abbrv] lucene-solr git commit: SOLR-8696: Straighten out
calls to ZkStateReader#createClusterStateWatchersAndUpdate.
SOLR-8696: Straighten out calls to ZkStateReader#createClusterStateWatchersAndUpdate.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/a9aec242
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/a9aec242
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/a9aec242
Branch: refs/heads/jira/SOLR-445
Commit: a9aec24236df61a3f1cfe533b64169fae84fc6f7
Parents: 3cc8b6f
Author: Mark Miller <ma...@gmail.com>
Authored: Mon Feb 29 13:08:33 2016 -0800
Committer: Mark Miller <ma...@gmail.com>
Committed: Mon Feb 29 13:09:09 2016 -0800
----------------------------------------------------------------------
solr/core/src/java/org/apache/solr/cloud/ZkController.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a9aec242/solr/core/src/java/org/apache/solr/cloud/ZkController.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkController.java b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
index f136307..2547f3b 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkController.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
@@ -254,6 +254,8 @@ public final class ZkController {
log.info("ZooKeeper session re-connected ... refreshing core states after session expiration.");
try {
+ zkStateReader.createClusterStateWatchersAndUpdate();
+
// this is troublesome - we dont want to kill anything the old
// leader accepted
// though I guess sync will likely get those updates back? But
@@ -283,8 +285,6 @@ public final class ZkController {
registerAllCoresAsDown(registerOnReconnect, false);
- zkStateReader.createClusterStateWatchersAndUpdate();
-
// we have to register as live first to pick up docs in the buffer
createEphemeralLiveNode();
@@ -620,6 +620,7 @@ public final class ZkController {
try {
createClusterZkNodes(zkClient);
+ zkStateReader.createClusterStateWatchersAndUpdate();
// start the overseer first as following code may need it's processing
if (!zkRunOnly) {
@@ -632,10 +633,8 @@ public final class ZkController {
overseerElector.joinElection(context, false);
}
- zkStateReader.createClusterStateWatchersAndUpdate();
Stat stat = zkClient.exists(ZkStateReader.LIVE_NODES_ZKNODE, null, true);
if (stat != null && stat.getNumChildren() > 0) {
- zkStateReader.createClusterStateWatchersAndUpdate();
publishAndWaitForDownStates();
}