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: [email protected]
For additional commands, e-mail: [email protected]