You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/17 16:24:29 UTC

[GitHub] [apisix] shuaijinchao commented on a change in pull request #5083: fix(nacos): distinguish services that has same name but in different groups or namespaces

shuaijinchao commented on a change in pull request #5083:
URL: https://github.com/apache/apisix/pull/5083#discussion_r711192577



##########
File path: apisix/discovery/nacos.lua
##########
@@ -307,11 +311,21 @@ local function fetch_full_registry(premature)
             return
         end
 
+        if not up_apps[namespace_id] then
+            up_apps[namespace_id] = {}
+        end
+
+        if not up_apps[namespace_id][group_name] then
+            up_apps[namespace_id][group_name] = {}
+        end
+
         for _, host in ipairs(data.hosts) do
-            local nodes = up_apps[service_info.service_name]
+            local nodes = up_apps[namespace_id]
+            [group_name][service_info.service_name]

Review comment:
       It will be better to merge it into one line for readability.




-- 
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@apisix.apache.org

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