resolve conflict

This commit is contained in:
Albumen Kevin 2022-12-29 17:33:56 +08:00
parent 0e4997b252
commit f5df7edcdf
1 changed files with 2 additions and 3 deletions

View File

@ -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) {