Radeity commented on code in PR #13013:
URL: 
https://github.com/apache/dolphinscheduler/pull/13013#discussion_r1032953783


##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/registry/RegistryClient.java:
##########
@@ -144,7 +145,9 @@ public Map<String, String> getServerMaps(NodeType nodeType) 
{
             String path = rootNodePath(nodeType);
             Collection<String> serverList = getServerNodes(nodeType);
             for (String server : serverList) {
-                serverMap.putIfAbsent(server, get(path + SINGLE_SLASH + 
server));
+                if (NetUtils.isLegalAddress(server)) {
+                    serverMap.putIfAbsent(server, get(path + SINGLE_SLASH + 
server));
+                }

Review Comment:
   I think the check should throw exception, rather return false, there's must 
be some unexpected errors if it doesn't pass the check.



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

Reply via email to