You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2021/03/11 03:41:04 UTC

[dubbo] branch master updated: [ISSUE-#7339] Didn't judge check in serviceDiscoveryRegistry (#7340)

This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/master by this push:
     new fab59fc  [ISSUE-#7339] Didn't judge check in serviceDiscoveryRegistry (#7340)
fab59fc is described below

commit fab59fc5d063e736444449dddecc74b7e0f84b71
Author: 赵延 <10...@qq.com>
AuthorDate: Thu Mar 11 11:40:18 2021 +0800

    [ISSUE-#7339] Didn't judge check in serviceDiscoveryRegistry (#7340)
    
    * Didn't judge check in serviceDiscoveryRegistry, it should take over by ReferenceConfig.checkInvokerAvailable
    
    * remove unnecessary import
---
 .../apache/dubbo/registry/client/ServiceDiscoveryRegistry.java    | 8 ++------
 1 file changed, 2 insertions(+), 6 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 e705c7c..7c59c21 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
@@ -52,7 +52,6 @@ import static java.util.Collections.emptySet;
 import static java.util.Collections.unmodifiableSet;
 import static java.util.stream.Collectors.toSet;
 import static java.util.stream.Stream.of;
-import static org.apache.dubbo.common.constants.CommonConstants.CHECK_KEY;
 import static org.apache.dubbo.common.constants.CommonConstants.DUBBO;
 import static org.apache.dubbo.common.constants.CommonConstants.GROUP_CHAR_SEPARATOR;
 import static org.apache.dubbo.common.constants.CommonConstants.GROUP_KEY;
@@ -260,13 +259,10 @@ public class ServiceDiscoveryRegistry implements Registry {
     public void doSubscribe(URL url, NotifyListener listener) {
         writableMetadataService.subscribeURL(url);
 
-        boolean check = url.getParameter(CHECK_KEY, false);
         Set<String> serviceNames = getServices(url, listener);
 
         if (CollectionUtils.isEmpty(serviceNames)) {
-            if (check) {
-                throw new IllegalStateException("Should has at least one way to know which services this interface belongs to, subscription url: " + url);
-            }
+            logger.warn("Should has at least one way to know which services this interface belongs to, subscription url: " + url);
             return;
         }
 
@@ -499,4 +495,4 @@ public class ServiceDiscoveryRegistry implements Registry {
             }
         }
     }
-}
\ No newline at end of file
+}