You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2013/10/05 13:09:41 UTC

[jira] [Commented] (SOLR-5255) Extraneous zookeeper call in ZkStateReader cluster state watcher and setting wrong watcher

    [ https://issues.apache.org/jira/browse/SOLR-5255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13787176#comment-13787176 ] 

ASF subversion and git services commented on SOLR-5255:
-------------------------------------------------------

Commit 1529433 from shalin@apache.org in branch 'dev/trunk'
[ https://svn.apache.org/r1529433 ]

SOLR-5255: Remove unnecessary call to fetch and watch live nodes in ZkStateReader cluster watcher

> Extraneous zookeeper call in ZkStateReader cluster state watcher and setting wrong watcher
> ------------------------------------------------------------------------------------------
>
>                 Key: SOLR-5255
>                 URL: https://issues.apache.org/jira/browse/SOLR-5255
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.4, 4.5, 5.0
>            Reporter: Jessica Cheng
>            Assignee: Shalin Shekhar Mangar
>              Labels: cloud, zookeeper
>
> In ZkStateReader.createClusterStateWatchersAndUpdate, in the watcher for the call to watch CLUSTER_STATE:
>     List<String> liveNodes = zkClient.getChildren(
>         LIVE_NODES_ZKNODE, this, true);
>      
>     Set<String> liveNodesSet = new HashSet<String>();
>     liveNodesSet.addAll(liveNodes);
> The liveNodesSet set is never used in subsequent code, since the new cluster state is made from the live node set from the existing cluster state:
>     Set<String> ln = ZkStateReader.this.clusterState.getLiveNodes();
>     ClusterState clusterState = ClusterState.load(stat.getVersion(), data, ln);
> ...which is as it should since this is a watcher for cluster state (if live nodes changes, the watcher for live nodes will be invoked).
> Due to the above extraneous call, however, now the cluster state watcher (this) is also set on the LIVE_NODES_ZKNODE path, which is unnecessary to fire when live nodes changed.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org