mirror of https://github.com/apache/lucene.git
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:
parent
ba04a792ce
commit
a13df9ace6
|
@ -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
|
||||
---------------------
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue