shreemaan-abhishek commented on code in PR #13066:
URL: https://github.com/apache/apisix/pull/13066#discussion_r2894016315


##########
apisix/discovery/consul/init.lua:
##########
@@ -149,14 +162,21 @@ local function read_dump_services()
         return
     end
 
-    all_services = entity.services
-    log.info("load dump file into memory success")
+    for k, v in pairs(entity.services) do
+        local content, json_err = core.json.encode(v)
+        if content then
+            consul_dict:set(k, content)
+        else
+            log.error("failed to encode dump service: ", k, ", error: ", 
json_err)
+        end
+    end
+    log.info("load dump file into shared dict success")

Review Comment:
   since the values are set using service keys, I don't think this should be of 
concern.



-- 
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