leslie-tsang commented on a change in pull request #6247:
URL: https://github.com/apache/apisix/pull/6247#discussion_r800272491
##########
File path: apisix/discovery/nacos/init.lua
##########
@@ -236,7 +236,18 @@ local function is_grpc(scheme)
return false
end
-
+local function compareService(last_service_info,service_info)
+ if not last_service_info or not service_info then
+ return false
+ end
+ if last_service_info.namespace_id == service_info.namespace_id and
+ last_service_info.group_name == service_info.group_name and
+ last_service_info.service_name == service_info.service_name then
+ return true
+ else
+ return false
+ end
+end
Review comment:
```suggestion
end
```
The functions needs to be separated by two blank.
We have a [code style
rule](https://github.com/apache/apisix/blob/master/CODE_STYLE.md#blank-line) to
follow. :)
##########
File path: apisix/discovery/nacos/init.lua
##########
@@ -259,7 +270,17 @@ local function fetch_full_registry(premature)
return
end
+ table.sort(infos,function(a,b)
Review comment:
Need to add `local table = table` to avoid a global variables access.
--
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]