You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2018/01/20 20:21:00 UTC
[jira] [Created] (SOLR-11878) Remove ClusterStateProvider.connect()
method
David Smiley created SOLR-11878:
-----------------------------------
Summary: Remove ClusterStateProvider.connect() method
Key: SOLR-11878
URL: https://issues.apache.org/jira/browse/SOLR-11878
Project: Solr
Issue Type: Improvement
Security Level: Public (Default Security Level. Issues are Public)
Components: SolrCloud, SolrJ
Reporter: David Smiley
I'm writing a test wherein I call {{solrClient.getClusterStateProvider().getState(collectionName)}} and in certain cases it can throw an NPE due to no zkStateReader. Apparently it wasn't connect()'ed first. I think this is a design flaw – no connect() method ought to be needed IMO. It needs to connect, sure, but can't that detail be handled completely internally to the provider impl? ZkClientClusterStateProvider.getZkStateReader could become what connect() is right now, and then all code in ZkClientClusterStateProvider that needs the zkStateReader should call that method and not access the field directly.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org