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


##########
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.
   
   may no any errors. because old DS version will contain `default` node, and 
no any update steps will remove it. may do not need throw a exception to print 
log each 10s. WDYT.



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