You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org> on 2015/04/15 16:13:59 UTC

[jira] [Commented] (SOLR-7401) NPE when concurrently creating and deleting collections

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

Shalin Shekhar Mangar commented on SOLR-7401:
---------------------------------------------

+1 LGTM

> NPE when concurrently creating and deleting collections
> -------------------------------------------------------
>
>                 Key: SOLR-7401
>                 URL: https://issues.apache.org/jira/browse/SOLR-7401
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>         Attachments: SOLR-7401.patch
>
>
> I've hit this when multiple tests run against the same Solr server. Some tests create a collection, do some stuff and then delete it, but there are two tests which create+delete a collection, and then assert it doesn't exist by searching it (expecting to hit an exception). While I think this isn't the best way to assert a collection doesn't exist (I intend to change this assert to use a LIST command), it did surface this concurrency bug.
> {noformat}
> java.lang.NullPointerException
> 	at java.util.ArrayList.addAll(ArrayList.java:577)
> 	at org.apache.solr.servlet.SolrDispatchFilter.getSlicesForCollections(SolrDispatchFilter.java:731)
> 	at org.apache.solr.servlet.SolrDispatchFilter.getRemotCoreUrl(SolrDispatchFilter.java:669)
> {noformat}
> The problem is that getSlicesForCollections may get a CollectionRef whose collection value may be {{null}}, therefore attempting to add {{null}} to the list. I reproduced in a test, and fixed the bug.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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