Skip update when endpoints resource version equal#19775
Skip update when endpoints resource version equal#19775istio-testing merged 1 commit intoistio:masterfrom
Conversation
| curE := cur.(*v1.Endpoints) | ||
|
|
||
| if !compareEndpoints(oldE, curE) { | ||
| if curE.ResourceVersion != oldE.ResourceVersion || !compareEndpoints(oldE, curE) { |
There was a problem hiding this comment.
nit: can we move this condition also to the top of compareEndpoints before subset len check and add a test case for it?
There was a problem hiding this comment.
no, they are different stuff.
There was a problem hiding this comment.
is there ever any time the resource version is the same but the endpoints are different?
Is there ever a time when compareEndpoints gives a different response than the resource version check?
Why is update func even called if resource version changes?
There was a problem hiding this comment.
The version will not change when resynced
is there ever any time the resource version is the same but the endpoints are different?
No
Is there ever a time when compareEndpoints gives a different response than the resource version check?
The compareEndpoints is a little costly, and it is definitely a subset of version compare
Why is update func even called if resource version changes?
I think you mean resource version not change, it is the k8s mechanism, to make sure client do not miss an object update as k8s is eventual consistent, and event may get lost for many resons.
|
ping @howardjohn |
This reverts commit a42d9e7.
No description provided.