You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Andrzej Bialecki (JIRA)" <ji...@apache.org> on 2018/01/23 12:25:00 UTC

[jira] [Commented] (SOLR-11878) Remove ClusterStateProvider.connect() method

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

Andrzej Bialecki  commented on SOLR-11878:
------------------------------------------

I agree, current implementations don't need it for their life-cycle, {{ZkClientClusterStateProvider}} should handle this as an implementation detail.

> 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
>            Priority: Major
>
> 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