From 4571d662da04b84a70be488d1883d5da30f342bb Mon Sep 17 00:00:00 2001 From: chengyouling Date: Mon, 11 Nov 2024 19:08:36 +0800 Subject: [PATCH] [#1403] Frequent printing of registration and configuration center addresses when open auto-discovery --- .../servicecomb/discovery/discovery/ServiceAddressManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-cloud-huawei-service-engine/service-engine-discovery/src/main/java/com/huaweicloud/servicecomb/discovery/discovery/ServiceAddressManager.java b/spring-cloud-huawei-service-engine/service-engine-discovery/src/main/java/com/huaweicloud/servicecomb/discovery/discovery/ServiceAddressManager.java index 5fd411636..53da0f69f 100644 --- a/spring-cloud-huawei-service-engine/service-engine-discovery/src/main/java/com/huaweicloud/servicecomb/discovery/discovery/ServiceAddressManager.java +++ b/spring-cloud-huawei-service-engine/service-engine-discovery/src/main/java/com/huaweicloud/servicecomb/discovery/discovery/ServiceAddressManager.java @@ -81,11 +81,11 @@ private void initEndPort(String key) { key, DiscoveryConstants.VERSION_RULE_LATEST); HashSet currentEngineEndpoints = new HashSet<>(); Map> zoneAndRegion = generateZoneAndRegionAddress(instances, currentEngineEndpoints); - LOGGER.info("auto discovery service [{}] addresses: [{}]", key, zoneAndRegion); if (zoneAndRegion == null) { return; } if (isEngineEndpointsChanged(lastEngineEndpointsCache.get(key), currentEngineEndpoints)) { + LOGGER.info("auto discovery service [{}] addresses: [{}]", key, zoneAndRegion); lastEngineEndpointsCache.put(key, currentEngineEndpoints); EventManager.post(new RefreshEndpointEvent(zoneAndRegion, key)); }