-
Notifications
You must be signed in to change notification settings - Fork 38.8k
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
storage.Interface KV impl. of etcd v3 #23387
Conversation
Labelling this PR as size/XL |
GCE e2e build/test passed for commit 2265c02658ef11d704970a8c8a9947d15cdd44e5. |
GCE e2e build/test passed for commit a719726a717cba6d3bfa3a72861cf527f1302676. |
The author of this PR is not in the whitelist for merge, can one of the admins add the 'ok-to-merge' label? |
@timothysc @lavalamp - FYI |
limitations under the License. | ||
*/ | ||
|
||
package etcd |
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.
I suggest making a new package for etcd3 and keeping the same function names rather than adding new functions to the same package.
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.
(If there's common functionality you want to reuse, that's fine, move it to a separate package :) )
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.
Otherwise, there's no way for users to avoid importing the etcd definition they don't want to use. Among other reasons.
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.
Sure. Will do it.
108c467
to
77c3fab
Compare
GCE e2e build/test passed for commit 9dff3d90315d425ceb8f3c982d195d416a4faf36. |
GCE e2e build/test passed for commit c7ca2588aed468694a3b2b88acc82a85afb2f56b. |
GCE e2e build/test passed for commit 108c467447d0807d0e432d9918cce803631cd530. |
GCE e2e build/test passed for commit 77c3fabac7786bdc5ec58aaf9d180a78c2e872d5. |
I'll look over in the a.m. , still catching up from PTO. |
GCE e2e build/test passed for commit 7a603376d8b8d074c305e83db2385154fbebce99. |
I will take a look later today. |
|
||
// extractRevision extracts revision from obj. | ||
// If obj has resource version >0, it will be reset to 0. | ||
func extractRevision(versioner storage.Versioner, obj runtime.Object) (int64, error) { |
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.
We should probably rename it to reflect the fact that resource version is set to 0 if different.
Maybe:
extractAndResetRevision
?
Fixed comments |
} | ||
if !txnResp.Succeeded { | ||
getResp = (*clientv3.GetResponse)(txnResp.Responses[0].GetResponseRange()) | ||
glog.Infof("deletion of %s failed because of a conflict, going to retry", key) |
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.
Is there a reason for Info level vs V4? Just wondering...
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.
My mistake. I set V4 for guaranteedUpdate though :(
Minor comments, then lgtm for part 1. |
GCE e2e build/test passed for commit da6cda1157b6410275db1d6eda413e210b99bf9c. |
This implements Get(), Create(), Delete(), GetToList(), List(), GuaranteedUpdate().
Addressed comments and squashed commits. |
GCE e2e build/test passed for commit 75eba2a39678fd0ada54c60c06077e4fa1ca819f. |
GCE e2e build/test passed for commit 00ddf06. |
GCE e2e build/test passed for commit c374a3218a544cb88d2ba89219c81958860bfe1c. |
thx @hongchaodeng for seeing this through. part 1 lgtm. |
LGTM too |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test failed for commit 00ddf06. Please reference the list of currently known flakes when examining this failure. If you request a re-test, you must reference the issue describing the flake. |
@timothysc |
Flake issue: #22671 |
Readding lgtm label. |
GCE e2e build/test passed for commit 00ddf06. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 00ddf06. |
Automatic merge from submit-queue |
This is the initial implementation of #22448.
The PR consists of two parts: