-
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
Etcd V3 is missing PrevNode feature #5496
Comments
You can range with revision to get previous value. |
Use a txn that gets the key first, then do a delete/put. Also this is a dup of #4620. I would suggest you read https://github.com/coreos/etcd/blob/master/Documentation/op-guide/v2-migration.md#migrate-client-library and search the existing issues. It might save you some time. Thanks. |
Interesting, how would this work? When you get your response, you'd have to On Mon, May 30, 2016 at 8:33 PM, Xiang Li [email protected] wrote:
|
@purpleidea I think I have told you how to do it. Use a txn with one get and one write/delete requests. For example, see https://github.com/kubernetes/kubernetes/blob/master/pkg/storage/etcd3/store.go#L169-L182 |
@xiang90 I sent that previous message before getting your initial reply. GH email has a long processing delay for both sending and receiving, sorry. |
As an aside, while transactions are nice, they don't actually solve this problem for watch events AFAIK. When you receive the events, there's no way to have it also contain the previous revision without adding another call. If i'm mistaken, please let me know. |
I'm porting some etcd V2 code to V3. In watch events there was the concept of PrevNode:
eg:
This was useful to track changes easily. Is there an equivalent in V3? If not, are there any recommendations on how to emulate the behaviour?
Thanks!
The text was updated successfully, but these errors were encountered: