You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/11/28 06:28:37 UTC

[GitHub] [dubbo] AlbumenJ commented on a diff in pull request #11038: Fix dubbo service name bug

AlbumenJ commented on code in PR #11038:
URL: https://github.com/apache/dubbo/pull/11038#discussion_r1033166261


##########
dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java:
##########
@@ -180,23 +179,22 @@ public void doUnregister(final URL url) {
 
     @Override
     public void doSubscribe(final URL url, final NotifyListener listener) {
-        NacosAggregateListener nacosAggregateListener = new NacosAggregateListener(listener);
-        originToAggregateListener.computeIfAbsent(url, k -> new ConcurrentHashMap<>()).put(listener, nacosAggregateListener);
-
-        Set<String> serviceNames = getServiceNames(url, nacosAggregateListener);
+        Set<String> serviceNames = getServiceNames(url, listener);
 
         //Set corresponding serviceNames for easy search later
         if (isServiceNamesWithCompatibleMode(url)) {
             for (String serviceName : serviceNames) {
                 NacosInstanceManageUtil.setCorrespondingServiceNames(serviceName, serviceNames);
             }
         }
-        doSubscribe(url, nacosAggregateListener, serviceNames);
+
+        doSubscribe(url, listener, serviceNames);
     }
 
-    private void doSubscribe(final URL url, final NacosAggregateListener listener, final Set<String> serviceNames) {
+    private void doSubscribe(final URL url, final NotifyListener listener, final Set<String> serviceNames) {
         execute(namingService -> {
             if (isServiceNamesWithCompatibleMode(url)) {
+                List<Instance> allCorrespondingInstanceList = Lists.newArrayList();

Review Comment:
   Please remove guava usage



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org