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

ASF subversion and git services commented on SOLR-7401:
-------------------------------------------------------

Commit 1673890 from [~shaie] in branch 'dev/branches/branch_5x'
[ https://svn.apache.org/r1673890 ]

SOLR-7401: fix copy/paste bug

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

Reply via email to