-
Notifications
You must be signed in to change notification settings - Fork 39.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
etcd3 store: retry with live object on conflict if there was a suggestion #43152
etcd3 store: retry with live object on conflict if there was a suggestion #43152
Conversation
Was the change to use the watch cache introduced in 1.5 or 1.6? I'm wondering if we need a release note. |
If we want this for 1.6, we should move #41892 back to the v1.6 milestone too |
75bcb7c
to
8e72586
Compare
return nil | ||
} | ||
|
||
func TestGuaranteedUpdate(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we give this test with a more descriptive name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xiang90 TestGuaranteedUpdateUsesLiveObjectOnConflict?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DropSuggestionsOnConflict?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
I feel it would be cleaner just do a pass through inside storage's GuaranteedUpdate func. But I guess we might argue to keep the actual storage implement simple for potential other backends. I do not have strong feeling here. |
@xiang90 I don't understand what you're suggesting. Could you please clarify? |
I'm trying to put together a test to satisfy myself that this does the right thing for Updates on AllowCreateOnUpdate items |
The storage implementation with curObj here: https://github.com/kubernetes/kubernetes/pull/43152/files#diff-dc17590f6b960d2fea2b44de5c0fbc10R529 The storage implementation can be smarter about dropping the suggested curObj and try again inside the func. So we do not need to explicitly drop the curObj outside the storage implementation. |
@xiang90 ok I understand, thanks. I'll wait for more review comments before I make any adjustments. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enj, liggitt, ncdc, wojtek-t Associated issue: 41892 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Removing label |
separately, it seems like we'd want to pick up an etcd level with a fix for that bug |
/retest |
1 similar comment
/retest |
/retest Review the full test history for this PR. |
1 similar comment
/retest Review the full test history for this PR. |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue (batch tested with PRs 52176, 43152). If you want to cherry-pick this change to another branch, please follow the instructions here.. |
@ncdc: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
will prep a pick to 1.7 (along with #48394 which was never picked as well) |
Commit found in the "release-1.7" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
Retry with a live object instead of the cached version if the watch
cache receives a conflict trying to do the update.
Fixes #41892