Apache Solr open-source search software
SOLR-6284: Fix NPE in OCP when non-existent sliceId is used for a deleteShard request. (This closes #74)
Anshum Guptaa13df9ace64a
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 39603f73254..1a9d5cfd608 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -272,6 +272,9 @@ Bug Fixes* SOLR-6372: HdfsDirectoryFactory should use supplied Configuration for communicating with secure kerberos.(Gregory Chanan via Mark Miller)+* SOLR-6284: Fix NPE in OCP when non-existent sliceId is used for a+ deleteShard request (Ramkumar Aiyengar via Anshum Gupta)+Optimizations---------------------diff --git a/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java b/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.javaindex da8a4eb9104..acc95edf6bb 100644--- a/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java+++ b/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java@@ -1684,11 +1684,11 @@ public class OverseerCollectionProcessor implements Runnable, Closeable {if (slice == null) {if(clusterState.hasCollection(collection)) {throw new SolrException(ErrorCode.BAD_REQUEST,- "No shard with the specified name exists: " + slice.getName());+ "No shard with name " + sliceId + " exists for collection " + collection);} else {throw new SolrException(ErrorCode.BAD_REQUEST,"No collection with the specified name exists: " + collection);- }+ }}// For now, only allow for deletions of Inactive slices or custom hashes (range==null).// TODO: Add check for range gaps on Slice deletion