From 4cbb7a7b4a1c9a9eb8b6e3a9146ec5ab577b48c7 Mon Sep 17 00:00:00 2001 From: chengyouling Date: Mon, 11 Nov 2024 19:06:14 +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)); }