pvcnt commented on code in PR #2353:
URL: https://github.com/apache/solr/pull/2353#discussion_r1529928198


##########
solr/core/src/java/org/apache/solr/cloud/api/collections/ReplaceNodeCmd.java:
##########
@@ -60,19 +60,19 @@ public void call(ClusterState state, ZkNodeProps message, 
NamedList<Object> resu
     boolean parallel = message.getBool("parallel", false);
     ClusterState clusterState = zkStateReader.getClusterState();
 
-    if (!clusterState.liveNodesContain(source)) {
-      throw new SolrException(
-          SolrException.ErrorCode.BAD_REQUEST, "Source Node: " + source + " is 
not live");
-    }
     if (target != null && !clusterState.liveNodesContain(target)) {
       throw new SolrException(
-          SolrException.ErrorCode.BAD_REQUEST, "Target Node: " + target + " is 
not live");
+          SolrException.ErrorCode.BAD_REQUEST, "Target node: " + target + " is 
not live");
     } else if (clusterState.getLiveNodes().size() <= 1) {
       throw new SolrException(
           SolrException.ErrorCode.BAD_REQUEST,
           "No nodes other than the source node: "
               + source
               + " are live, therefore replicas cannot be moved");
+    } else if (source.equals(target)) {

Review Comment:
   Not directly related to the issue, but still sounds like a good idea to 
verify.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to