You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Houston Putman (Jira)" <ji...@apache.org> on 2021/07/19 15:59:00 UTC

[jira] [Commented] (SOLR-15549) Old SolrJ implementations (8.x) are incompatible with 9.0 Clouds

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

Houston Putman commented on SOLR-15549:
---------------------------------------

I should note the difference between the PR for {{branch_8x}} and {{main}}.


h2. {{branch_8x}}

This changes the check in {{ZkStateReader}} from just checking for {{/clusterstate.json}} to looking for either {{/clusterstate.json}} or {{/collections}}. This will allow for users to use the 8.10 SolrJ APIs for 9.x Clouds.

h2. {{main}}

This adds a better error message in {{ZkStateReader}}, that lets the user know why the ZK Node is not hosting a SolrCloud, i.e. which ZNode is missing (usually {{/aliases.json}}). The implementation here had already been improved to not checking for individual paths, but capturing {{KeeperException.NoNodeExceptions}} and turning them into more user-usuably {{SolrExceptions}} . I also am using this PR to forward-port the ChangeLog entry.

> Old SolrJ implementations (8.x) are incompatible with 9.0 Clouds
> ----------------------------------------------------------------
>
>                 Key: SOLR-15549
>                 URL: https://issues.apache.org/jira/browse/SOLR-15549
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrJ
>    Affects Versions: 8.0
>            Reporter: Houston Putman
>            Assignee: Houston Putman
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The {{ZkStateReader}} in 8.x (and previous versions) checks that a {{/clusterstate.json}} node exists in the ZK ChRoot, to ensure that the ChRoot hosts a Solr Cloud. However, starting in 9.0, {{/clusterstate.json}} has been removed, and it is auto-deleted if a user tries to create one.
> That means that the ZkStateReader from SolrJ 8.x will error when trying to connect with a Solr 9 cloud, with the message:
> {quote}Cannot connect to cluster at localhost:2181/: cluster not found/not ready
> {quote}
> The solution, is to have the ZK State Reader check both {{/clusterstate.json}} and {{/collections}} and only error if both are missing.  {{/clusterstate.json}} is long-deprecated in 8.x anyways, so adding this additional check is good practice in general.
> While it would be nice for every user to use the same SolrJ version as the version they are running for Solr, it can be difficult in practice, especially when upgrading major Solr versions. It would be preferable to support at least version + 1 clouds in SolrJ, for the purpose of upgrades.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org