SOLR-6284: Fix NPE in OCP when non-existent sliceId is used for a deleteShard request. (This closes #74)

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1617968 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Anshum Gupta 2014-08-14 15:09:43 +00:00
parent ba04a792ce
commit a13df9ace6
2 changed files with 5 additions and 2 deletions

View File

@ -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
---------------------

View File

@ -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