grootTwig commented on issue #2060: URL: https://github.com/apache/apisix-ingress-controller/issues/2060#issuecomment-1820410826
> ### Current Behavior > Sometimes cr updated events is not synced without any error log. > > Reason: When a cr update event arrived,apisix-ingress-controller will compare the current resourceVersion and old resourceVersion, if current resourceVersion is less than or equal to old resourceVersion, this event will be discarded. However, the comparision here is using string comparision, which will lead to a wrong result. > > example: old resourceVersion: 999999 new resourceVersion: 1000000 "999999" >= "1000000" will be true in golang ,and the event would be discarded. > > ### Expected Behavior > _No response_ > > ### Error Logs > _No response_ > > ### Steps to Reproduce > create enough events in k8s so that the length of cr's resourceVerison will increase. > > ### Environment > apisix-ingress-controller version:1.7.0 kubernetes version: 1.24.4 code in v1.7.0: pkg/providers/apisix/apisix_cluster_config.go:L280 pkg/providers/apisix/apisix_consumer.go:L246 pkg/providers/apisix/apisix_global_rule.go:L277 pkg/providers/apisix/apisix_plugin_config.go:L320 pkg/providers/apisix/apisix_route.go:L533 pkg/providers/apisix/apisix_tls.go:L329 pkg/providers/apisix/apisix_upstream.go:L539 -- 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]
