From f5df7edcdfbe3eed21e34700d7dc42e1bf925fa2 Mon Sep 17 00:00:00 2001 From: Albumen Kevin Date: Thu, 29 Dec 2022 17:33:56 +0800 Subject: [PATCH] resolve conflict --- .../dubbo/registry/client/ServiceDiscoveryRegistry.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java index fa312813f7..0347cf369c 100644 --- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java +++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryRegistry.java @@ -42,7 +42,6 @@ import static org.apache.dubbo.common.constants.CommonConstants.CHECK_KEY; import static org.apache.dubbo.common.constants.CommonConstants.INTERFACE_KEY; import static org.apache.dubbo.common.constants.CommonConstants.PROVIDER_SIDE; import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR; -import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR; import static org.apache.dubbo.common.constants.RegistryConstants.REGISTRY_CLUSTER_KEY; import static org.apache.dubbo.common.constants.RegistryConstants.REGISTRY_TYPE_KEY; import static org.apache.dubbo.common.constants.RegistryConstants.SERVICE_REGISTRY_TYPE; @@ -203,9 +202,9 @@ public class ServiceDiscoveryRegistry extends FailbackRegistry { Lock mappingLock = serviceNameMapping.getMappingLock(key); try { mappingLock.lock(); - mappingByUrl = serviceNameMapping.getCachedMapping(url); + mappingByUrl = serviceNameMapping.getMapping(url); try { - MappingListener mappingListener = new DefaultMappingListener(url, subscribedServices, listener); + MappingListener mappingListener = new DefaultMappingListener(url, mappingByUrl, listener); mappingByUrl = serviceNameMapping.getAndListen(this.getUrl(), url, mappingListener); mappingListeners.put(url.getProtocolServiceKey(), mappingListener); } catch (Exception e) {