You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/11/27 15:51:16 UTC

[GitHub] [dolphinscheduler] Radeity commented on a diff in pull request #13013: [Fix-12981]add worker address validator and clear function.

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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org