Shai Erera created SOLR-7401:
--------------------------------
Summary: 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
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]