-
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
Document why all REST calls return resourceVersion #2171
Comments
Great questions. Keep them coming. We're going to overhaul the documentation soon. Regarding this issue, see #1184. The value of resourceVersion is currently etcd's sequencer. Think of it as a logical clock the apiserver can use to order requests. |
@bgrant0607 I would say that the client side shouldn't be aware/consider server side ordering issues - that should be completely a server side implementation detail how the requests are ordered. Clients should be exposed solely to information they can/should do something about (create an entity, change a property on an entity, etc.) |
More specifically, the resourceVersion in a list is the resourceVersion at which one must start watching if one wants to be certain not to miss any changes. |
Clients should treat it as an opaque field, of course. |
I think for future implementors of alternate backends we should document we assume that the underlying store supports snapshot isolation reads, and the resource version is the global transaction id (or resource local transaction id) that supports a subsequent read. Since we like watch as a pattern, and we depend on it from a number of places. |
What is the meaning (and the purpose) of PodList resourceVersion? - isn't it just the collection of current pods? In which circumstances does it change? when a new pod is added? when any pod is updated? Is there any use case when the REST api user should refer to the collection's resourceVersion and/or pass this version to the server? (when do users pass a list of pods to the server?)
thank you.
The text was updated successfully, but these errors were encountered: