wheatt opened a new issue, #1187: URL: https://github.com/apache/apisix-ingress-controller/issues/1187
### Issue description 在pkg/ingress/endpoint.go文件中,syncEndpoint方法 ``` c.controller.syncEndpoint(ctx, newestEp) ``` 会调用dashboard接口更新upstream ip信息 ``` resp, err := u.cluster.updateResource(ctx, url, "upstream", bytes.NewReader(body)) ``` 调用接口默认超时时间为5s,超时后会返回错误信息并立即进行下一次endpoint资源同步 但是对http请求来说,客户端超时后返回后并不会影响服务端的处理,服务端会继续处理该请求 如果下一次同步同一个endpoint资源,并且update upstream响应比较块的话,就有可能造成旧ip列表覆盖新ip列表的情况 ### Environment - your apisix-ingress-controller version (output of apisix-ingress-controller version --long): - your Kubernetes cluster version (output of kubectl version): - if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a): ### Minimal test code / Steps to reproduce 1. ### Actual result 第一次同步endpoint-A,ip列表为ip1、ip2、ip3 如果调用dashboard update upstream接口(记为请求1)超时,客户端会立即返回,并进行下一次同步,此时服务端还会继续处理请求1 第二次同步endpoint-A,ip列表为ip1、ip2 调用dashboard update upstream接口(记为请求2) 由于dashboard并不能保证请求1比请求2先处理完成,所以可能会造成请求1的数据覆盖请求2的数据,导致异常 ### Error log none ### Expected result _No response_ -- 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]
