-
Notifications
You must be signed in to change notification settings - Fork 9.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
what is different about Revision, ModRevision and Version? #6518
Comments
@YuleiXiao the |
Probably we should add the explanation into our docs. |
Explicitly call them out here? https://github.com/coreos/etcd/blob/master/Documentation/learning/data_model.md |
@YuleiXiao Here's a simple example
|
@heyitsanthony like |
@YuleiXiao I do not think you understand what @heyitsanthony and @gyuho said. First, you need to understand what are revision and version. Then it is straightforward to decide if you want to use modRev or Rev. Both of them can be used. Version is not Rev. So it is irrelevant. |
@xiang90 I try to understand. But still confused, like the example gyuho show me. If I
|
It depends on what you want to get. You can use both, but you cannot use them at the same time. Let me try again to explain what @heyitsanthony mentioned previously. Revision is a global revision. ModRevision is the revision that the key is modified. It is just like time. You created a file at time 20:00(3). When you read the file at 21:00(4), the modified time (modRevision) is still 20:00 (3), but current time (revision) is 21:00(4). etcd is a mvcc system which keeps all history until a compaction. It allows you to go back in time. Get with revision will allow you to go back in time. So basically you asked us, shall I go back to 20:00 to get the state of the store or should I go back to 21:00? We cannot decide this for you. It depends on your use case. |
@xiang90 ok, thanks very much. Understand it. |
@YuleiXiao No problem. Please help to improve the doc if you have time. Thanks. |
This confused me just looking at the protos; reading up on etcd-io/etcd#6518 helped clarify things. I highlighted the terms that show up as fields in protos and tried to clean up some of the language.
This confused me just looking at the protos; reading up on etcd-io/etcd#6518 helped clarify things. I highlighted the terms that show up as fields in protos and tried to clean up some of the language.
This confused me just looking at the protos; reading up on etcd-io/etcd#6518 helped clarify things. I highlighted the terms that show up as fields in protos and tried to clean up some of the language.
This confused me just looking at the protos; reading up on etcd-io/etcd#6518 helped clarify things. I highlighted the terms that show up as fields in protos and tried to clean up some of the language.
This confused me just looking at the protos; reading up on etcd-io/etcd#6518 helped clarify things. I highlighted the terms that show up as fields in protos and tried to clean up some of the language.
This confused me just looking at the protos; reading up on etcd-io/etcd#6518 helped clarify things. I highlighted the terms that show up as fields in protos and tried to clean up some of the language.
Hi all, Read through the thread. I have a question. In another way, is it possible that etcd receives a put request, current global revision is 1 so key's mod_revision will be 1 + 1 = 2, however due to other client operations, global revision goes to 5 for example, so when etcd send Thanks. |
After check the source code, looks like the assumption is correct. Please correct me if I am wrong. |
Revision
inResponseHeader
, andModRevision
andVersion
inKeyValue
, what is different about them. I am confused from the comment.If I
Watch
withWithRev
, which one I should fill intoWithRev
?The text was updated successfully, but these errors were encountered: