Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-6882: Misspelled collection API actions in ReplicaMutator exception messages

Shalin Shekhar Mangar6f74593cb656
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 97b30189747..dcd029b8f60 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -533,6 +533,9 @@ Other Changes
* SOLR-6883: CLUSTERPROP API switch case does not call break. (Varun Thacker via shalin)
+* SOLR-6882: Misspelled collection API actions in ReplicaMutator exception messages.
+ (Steve Rowe via shalin)
+
================== 4.10.3 ==================
Bug Fixes
diff --git a/solr/core/src/java/org/apache/solr/cloud/Overseer.java b/solr/core/src/java/org/apache/solr/cloud/Overseer.java
index 16a3ab609c1..621d9f31f84 100644
--- a/solr/core/src/java/org/apache/solr/cloud/Overseer.java
+++ b/solr/core/src/java/org/apache/solr/cloud/Overseer.java
@@ -402,7 +402,7 @@ public class Overseer implements Closeable {
case ADDREPLICAPROP:
return new ReplicaMutator(getZkStateReader()).addReplicaProperty(clusterState, message);
case DELETEREPLICAPROP:
- return new ReplicaMutator(getZkStateReader()).removeReplicaProperty(clusterState, message);
+ return new ReplicaMutator(getZkStateReader()).deleteReplicaProperty(clusterState, message);
case BALANCESHARDUNIQUE:
ExclusiveSliceProperty dProp = new ExclusiveSliceProperty(clusterState, message);
if (dProp.balanceProperty()) {
diff --git a/solr/core/src/java/org/apache/solr/cloud/overseer/ReplicaMutator.java b/solr/core/src/java/org/apache/solr/cloud/overseer/ReplicaMutator.java
index bfa25e6a800..ed3e314446f 100644
--- a/solr/core/src/java/org/apache/solr/cloud/overseer/ReplicaMutator.java
+++ b/solr/core/src/java/org/apache/solr/cloud/overseer/ReplicaMutator.java
@@ -94,7 +94,7 @@ public class ReplicaMutator {
checkKeyExistence(message, ZkStateReader.PROPERTY_PROP) == false ||
checkKeyExistence(message, ZkStateReader.PROPERTY_VALUE_PROP) == false) {
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
- "Overseer SETREPLICAPROPERTY requires " +
+ "Overseer ADDREPLICAPROP requires " +
ZkStateReader.COLLECTION_PROP + " and " + ZkStateReader.SHARD_ID_PROP + " and " +
ZkStateReader.REPLICA_PROP + " and " + ZkStateReader.PROPERTY_PROP + " and " +
ZkStateReader.PROPERTY_VALUE_PROP + " no action taken.");
@@ -115,7 +115,7 @@ public class ReplicaMutator {
if (SliceMutator.SLICE_UNIQUE_BOOLEAN_PROPERTIES.contains(property)) {
if (StringUtils.isNotBlank(shardUnique) && Boolean.parseBoolean(shardUnique) == false) {
- throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Overseer SETREPLICAPROPERTY for " +
+ throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Overseer ADDREPLICAPROP for " +
property + " cannot have " + OverseerCollectionProcessor.SHARD_UNIQUE + " set to anything other than" +
"'true'. No action taken");
}
@@ -153,13 +153,13 @@ public class ReplicaMutator {
return new ZkWriteCommand(collectionName, newCollection);
}
- public ZkWriteCommand removeReplicaProperty(ClusterState clusterState, ZkNodeProps message) {
+ public ZkWriteCommand deleteReplicaProperty(ClusterState clusterState, ZkNodeProps message) {
if (checkKeyExistence(message, ZkStateReader.COLLECTION_PROP) == false ||
checkKeyExistence(message, ZkStateReader.SHARD_ID_PROP) == false ||
checkKeyExistence(message, ZkStateReader.REPLICA_PROP) == false ||
checkKeyExistence(message, ZkStateReader.PROPERTY_PROP) == false) {
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
- "Overseer DELETEREPLICAPROPERTY requires " +
+ "Overseer DELETEREPLICAPROP requires " +
ZkStateReader.COLLECTION_PROP + " and " + ZkStateReader.SHARD_ID_PROP + " and " +
ZkStateReader.REPLICA_PROP + " and " + ZkStateReader.PROPERTY_PROP + " no action taken.");
}