9268 commented on code in PR #12867:
URL: https://github.com/apache/apisix/pull/12867#discussion_r2730744337


##########
apisix/discovery/nacos/init.lua:
##########
@@ -396,19 +405,30 @@ local function fetch_full_registry(premature)
 end
 
 
+local function load_nodes_from_dict(key)
+    local value = nacos_dict:get(key)
+    if not value then
+        core.log.error("nacos service not found: ", key)
+        return nil
+    end
+    local nodes = core.json.decode(value)
+    return nodes
+end
+
 function _M.nodes(service_name, discovery_args)
     local namespace_id = discovery_args and
             discovery_args.namespace_id or default_namespace_id
     local group_name = discovery_args
             and discovery_args.group_name or default_group_name
     local key = get_key(namespace_id, group_name, service_name)
-    local value = nacos_dict:get(key)
-    if not value then
-        core.log.error("nacos service not found: ", service_name)
+
+    local nodes_version = nacos_dict:get(key .. "#version")
+    if not nodes_version then
+        core.log.error("nacos service version not found: ", key)
         return nil

Review Comment:
   yep



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to