-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Document API architectural approach for soundness and consistency #41954
Comments
Actually it's better than I expected. Cases:
The modification gives you back a ResourceVersion, which you can compare
Same answer, just tracking RV per-resource.
No general way at the moment.
Same as first two answers.
I'm not 100% sure I follow the question, I think the ending is garbled? |
/subscribe |
/sub |
Somewhat related: kubernetes/kubernetes#34363 |
Fixed my email-garbled comment above. |
One more - preconditions on deletion and other actions. A resourceVersion precondition on delete, for example. |
Would be very useful. Right now there is a race between delete and any other operation that updates the object. |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
/lifecycle frozen |
/remove-lifecycle stale |
Hi, is there any plan for this? Thx! |
For those following along at home, we have this now. |
I'd like to update my answers above considering the large amount of change the system has undergone.
Record the metadata.generation returned; when you observe and update with a generation >= that one, you've observed your change.
Same answer, just tracking RV per-resource.
We rely on the controller author to do something useful like record the observed generation.
We don't offer a way to detect an "after" relationship with a deletion. But we do now offer both UID and RV deletion preconditions, so folks doing the deletion no longer risk losing a change accidentally.
I have unpublished drafts on individual object locking for controllers-- it involves an annotation with an "I hold lock X" assertion + a webhook which does a consistent read of the lock object to confirm. |
Thanks for the updates. Is metadata.generation updated for all resource types? |
It is not 100% automated, so it's possible for an individual resource to do it wrong, but we would treat that as an important bug. |
Closing old issues that are unlikely to be useful any further. |
I actually believe this issue is still useful, we need documentation on the types of guarantees we provide for which API calls and what combinations of API calls one would need to make in order to preserve data integrity at a certain level. |
To some extent, this issue served as documentation. |
Can we turn it into documentation? Or re-open it as a request to write such documentation? |
Yeah that makes sense. |
For some more context, read: Life Beyond Distributed Transactions: An apostate's opinion /reopen |
@sftim: Reopened this issue. In response to this:
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. |
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
/transfer website |
/retitle Document API architectural approach for soundness and consistency Some parts of this work might end up in https://k8s.dev/docs/ |
/language en |
/remove-priority backlog |
This issue has not been updated in over 1 year, and should be re-triaged. You can:
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/ /remove-triage accepted |
There are a number of distributed-systems challenges with our API, which is:
Cases:
There are good reasons for the weak consistency semantics of the API, such as composability with add-on controllers, federated APIs, sharded storage, multiple layers of caches, etc.
The typical means of providing strong consistency is to provide all clients direct access to the database. That's not a viable approach for Kubernetes.
However, we probably have zero implementations of sound clients at the moment.
Examples of mechanisms we've discussed and/or partially implemented that would help:
But we should think about the problem holistically.
This is a prereq to kubernetes/kubernetes#1957
cc @lavalamp @pwittrock @erictune
The text was updated successfully, but these errors were encountered: