Apache Solr open-source search software
add null check
Mark Robert Miller1cf9bc4e28aa
diff --git a/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java b/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.javaindex b2796b38294..978819482fa 100644--- a/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java+++ b/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java@@ -528,6 +528,11 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {boolean leaderForAnyShard = false; // start off by assuming we are not a leader for any shardMap<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);