You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Tomás Fernández Löbbe (JIRA)" <ji...@apache.org> on 2017/02/27 17:55:46 UTC

[jira] [Resolved] (SOLR-10190) Potential NPE in CloudSolrClient when reading stale alias

     [ https://issues.apache.org/jira/browse/SOLR-10190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tomás Fernández Löbbe resolved SOLR-10190.
------------------------------------------
       Resolution: Fixed
    Fix Version/s: 6.4.2
                   master (7.0)
                   6.5

Resolving. Thanks Janosch!

> Potential NPE in CloudSolrClient when reading stale alias
> ---------------------------------------------------------
>
>                 Key: SOLR-10190
>                 URL: https://issues.apache.org/jira/browse/SOLR-10190
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: clients - java, SolrJ
>    Affects Versions: 5.5, 6.x, master (7.0)
>            Reporter: Janosch Woschitz
>            Assignee: Tomás Fernández Löbbe
>             Fix For: 6.5, master (7.0), 6.4.2
>
>
> The CloudSolrClient raises a NullPointerException when CloudSolrClient::add is invoked and pointed to an alias which references a collection which does not exist anymore.
> {code}
> java.lang.NullPointerException
>     at __randomizedtesting.SeedInfo.seed([1D00539A964E5C5D:D7D145363AD5CCA]:0)
>     at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:1078)
>     at org.apache.solr.client.solrj.impl.CloudSolrClient.request(CloudSolrClient.java:1042)
>     at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:160)
>     at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:106)
>     at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:71)
>     at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:85)
> {code}
> This is a rather unexpected since the CloudSolrClient usually raises a SolrException containing a descriptive error message (e.g. "Collection not found: xyz") when a collection cannot be resolved.
> In general this error condition could be triggered also by other edge cases since CloudSolrClient::getDocCollection might return null but the code following that invocation is not guarded against null values.
> {code}
>         // track the version of state we're using on the client side using the _stateVer_ param
>         DocCollection coll = getDocCollection(requestedCollection, null);
>         int collVer = coll.getZNodeVersion();
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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