You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2012/02/18 15:26:24 UTC

svn commit: r1245927 - /lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java

Author: markrmiller
Date: Sat Feb 18 14:26:23 2012
New Revision: 1245927

URL: http://svn.apache.org/viewvc?rev=1245927&view=rev
Log:
add null check

Modified:
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java?rev=1245927&r1=1245926&r2=1245927&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java Sat Feb 18 14:26:23 2012
@@ -528,6 +528,11 @@ public class DistributedUpdateProcessor 
       boolean leaderForAnyShard = false;  // start off by assuming we are not a leader for any shard
 
       Map<String,Slice> slices = zkController.getCloudState().getSlices(collection);
+      if (slices == null) {
+        throw new SolrException(ErrorCode.BAD_REQUEST,
+            "Cannot find collection:" + collection + " in "
+                + zkController.getCloudState().getCollections());
+      }
 
       ModifiableSolrParams params = new ModifiableSolrParams(req.getParams());
       params.set(DELETE_BY_QUERY_LEVEL, 2);