You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org> on 2016/05/04 10:45:12 UTC

[jira] [Commented] (SOLR-9014) Deprecate and reduce usage of ClusterState methods which may make calls to ZK via the lazy collection reference

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

Shalin Shekhar Mangar commented on SOLR-9014:
---------------------------------------------

I tried doing this (burned a few days actually) but there are just too many places to fix and thinking more on this, it just feels like a hack and a bad API. I think a better approach may be to ensure that we always create the collection znode and state.json together in one go, maybe as a 'multi' transaction. This would require a lot of cleanup e.g. bootstrapping mode may need to go away, ZkController.createCollectionZkNode must be purged, ZkCli's linkConfig command would no longer operate if the collection doesn't exist (do people even use it that way?) but I think we should do it.

> Deprecate and reduce usage of ClusterState methods which may make calls to ZK via the lazy collection reference
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-9014
>                 URL: https://issues.apache.org/jira/browse/SOLR-9014
>             Project: Solr
>          Issue Type: Improvement
>          Components: SolrCloud
>            Reporter: Shalin Shekhar Mangar
>             Fix For: 6.1, master
>
>         Attachments: SOLR-9014.patch
>
>
> ClusterState has a bunch of methods such as getSlice and getReplica which internally call getCollectionOrNull that ends up making a call to ZK via the lazy collection reference. Many classes use these methods even though a DocCollection object is available. In such cases, multiple redundant calls to ZooKeeper can happen if the collection is not watched locally. This is especially true for Overseer classes which operate on all collections.
> We should audit all usages of these methods and replace them with calls to appropriate DocCollection methods.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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