dsmiley commented on code in PR #3908:
URL: https://github.com/apache/solr/pull/3908#discussion_r2587170219


##########
solr/core/src/java/org/apache/solr/handler/admin/AdminHandlersProxy.java:
##########
@@ -136,8 +125,15 @@ private static void handleNamedListFormat(
 
   /** Makes a remote request asynchronously. */
   public static CompletableFuture<NamedList<Object>> callRemoteNode(
-      String nodeName, String uriPath, SolrParams params, ZkController 
zkController)
-      throws IOException, SolrServerException {
+      String nodeName, String uriPath, SolrParams params, ZkController 
zkController) {
+
+    // Validate that the node exists in the cluster
+    if 
(!zkController.zkStateReader.getClusterState().getLiveNodes().contains(nodeName))
 {
+      throw new SolrException(
+          SolrException.ErrorCode.BAD_REQUEST,
+          "Requested node " + nodeName + " is not part of cluster");

Review Comment:
   I was tempted to leave the check in `resolveNodes` but use `resolveNodes` 
for both code paths.  But `resolveNodes` references a specific parameter 
`nodes`.  It could be generalized a bit.  
   
   I'm fine leaving it or doing that change.



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