Fabriceli commented on code in PR #8651:
URL: https://github.com/apache/apisix/pull/8651#discussion_r1068221928
##########
apisix/discovery/consul/init.lua:
##########
@@ -237,53 +208,80 @@ function _M.connect(premature, consul_server, retry_delay)
log.info("connect consul: ", consul_server.consul_server_url,
", watch_result status: ", watch_result.status,
", watch_result.headers.index: ",
watch_result.headers['X-Consul-Index'],
- ", consul_server.index: ", consul_server.index,
- ", consul_server: ", json_delay_encode(consul_server, true))
+ ", consul_server.index: ", consul_server.index)
-- if current index different last index then update service
if consul_server.index ~= watch_result.headers['X-Consul-Index'] then
+ local up_services = core.table.new(0, #watch_result.body)
+ local consul_client_svc = resty_consul:new({
+ host = consul_server.host,
+ port = consul_server.port,
+ connect_timeout = consul_server.connect_timeout,
+ read_timeout = consul_server.read_timeout,
Review Comment:
it is not needed, because `default_args` which has `index` arg, that will
make **List Nodes for Service** got the wrong result.
> [Consul API Blocking
Queries](https://developer.hashicorp.com/consul/api-docs/features/blocking)
--
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]