charlesvhe commented on code in PR #9043:
URL: https://github.com/apache/apisix/pull/9043#discussion_r1132119439


##########
apisix/discovery/nacos/init.lua:
##########
@@ -315,6 +315,7 @@ local function fetch_full_registry(premature)
                 host = host.ip,
                 port = host.port,
                 weight = host.weight or default_weight,
+                metadata = host.metadata or {},

Review Comment:
   In fact, nacos currently returns an empty json object when metadata is not 
configured, which corresponds to an empty table in lua. In order to keep this 
feature stable, this is a failback mechanism. Prevent future destructive 
changes to existing apisix code if metadata does not return or null is returned 
by nacos next release



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