Copilot commented on code in PR #13236:
URL: https://github.com/apache/apisix/pull/13236#discussion_r3099214251
##########
apisix/discovery/nacos/init.lua:
##########
@@ -291,6 +292,10 @@ function _M.init_worker()
return
end
+ if process.type() ~= "privileged agent" then
+ return
+ end
Review Comment:
The new privileged-agent guard changes runtime behavior (workers no longer
fetch/refresh Nacos data themselves). There are existing Nacos discovery tests
under t/discovery/, but none assert that fetching happens only in the
privileged agent (or that workers don’t start the fetch timer). Please add a
regression test that fails if non-privileged workers perform Nacos fetches
(e.g., by asserting request counts/log lines or by using worker_processes > 1
and verifying only one periodic fetch).
--
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]