From a631ec3bf7e0465ea08c2251d100f4333a95627f Mon Sep 17 00:00:00 2001 From: nkorange Date: Fri, 14 Dec 2018 16:23:04 +0800 Subject: [PATCH] Fix #461 --- .../alibaba/nacos/naming/core/DomainsManager.java | 7 ------- .../nacos/naming/core/VirtualClusterDomain.java | 13 ------------- 2 files changed, 20 deletions(-) diff --git a/naming/src/main/java/com/alibaba/nacos/naming/core/DomainsManager.java b/naming/src/main/java/com/alibaba/nacos/naming/core/DomainsManager.java index 8c3b586c2..a7b1e4d90 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/core/DomainsManager.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/core/DomainsManager.java @@ -294,13 +294,6 @@ public class DomainsManager { throw new IllegalArgumentException("dom doesn't exist: " + domName); } - // set default port and site info if missing - for (IpAddress ip : ips) { - if (ip.getPort() == 0) { - ip.setPort(dom.getClusterMap().get(ip.getClusterName()).getDefIPPort()); - } - } - Datum datum1 = RaftCore.getDatum(UtilsAndCommons.getIPListStoreKey(dom)); String oldJson = StringUtils.EMPTY; diff --git a/naming/src/main/java/com/alibaba/nacos/naming/core/VirtualClusterDomain.java b/naming/src/main/java/com/alibaba/nacos/naming/core/VirtualClusterDomain.java index f0a3484d8..1d6da8cdf 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/core/VirtualClusterDomain.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/core/VirtualClusterDomain.java @@ -216,10 +216,6 @@ public class VirtualClusterDomain implements Domain, RaftListener { continue; } - if (ip.getPort() == 0) { - ip.setPort(getLegacyCkPort()); - } - if (StringUtils.isEmpty(ip.getClusterName())) { ip.setClusterName(UtilsAndCommons.DEFAULT_CLUSTER_NAME); } @@ -406,15 +402,6 @@ public class VirtualClusterDomain implements Domain, RaftListener { return JSON.toJSONString(domain); } - - /** - * the legacy check port is the default check port for old domain format - */ - @JSONField(serialize = false) - public int getLegacyCkPort() { - return clusterMap.get(UtilsAndCommons.DEFAULT_CLUSTER_NAME).getDefCkport(); - } - @Override public String getName() { return name;