Skip to content
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 使用小结 #33

Open
jinhailang opened this issue Aug 20, 2018 · 3 comments
Open

etcd 使用小结 #33

jinhailang opened this issue Aug 20, 2018 · 3 comments

Comments

@jinhailang
Copy link
Owner

etcd 使用小结

Revision

Revision 表示改动序号(ID),每次 KV 的变化,leader 节点都会修改 Revision 值,因此,这个值在 cluster(集群)内是全局唯一的,而且是递增的。

需要特别说明的是,RevisionModRevisonVersion 三者之间的区别:

  • ModRevison 记录了某个 key 最近修改时的 Revision,即它是与 key 关联的。
  • Version 表示 KV 的版本号,初始值为 1,每次修改 KV 对应的 version 都会加 1,也就是说它是作用在 KV 之内的。

使用参数 --write-out 可以格式化(json/fields ...)输出详细的信息,包括 RevisionModRevisonVersion

etcdctl get foo --write-out=fields

参考 etcd issues

@qichengzx
Copy link

👍

@panhow
Copy link

panhow commented Aug 19, 2019

你好喔,想请教一个问题,etcdctl支持获取某个Key的某Version的Value吗?

@huanghantao
Copy link

mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants