-
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
etcdctlv3: get range sorted by create not working as expected #6671
Comments
Try
? Works for me. |
Probably we need better documentation around this. |
gyuho
added a commit
to gyuho/etcd
that referenced
this issue
Oct 18, 2016
gyuho
added a commit
to gyuho/etcd
that referenced
this issue
Oct 18, 2016
@gyuho why we should provide an order here? if i tell etcdctl to sort keys by created revision, it should either sort them ascend or descend. right? |
gyuho
added a commit
to gyuho/etcd
that referenced
this issue
Oct 18, 2016
gyuho
added a commit
to gyuho/etcd
that referenced
this issue
Oct 18, 2016
Closing via #6672. |
Thanks guys. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
etcd v3.0.12 single local node cluster.
I am trying to use
etcdctl get
to get a range sorted by the creation time. However, I am seeing the range seems to be always sorted in lexical order.For example, if I create keys foo3, foo1, and foo2 in that order:
$ etcdctl put foo3 foo3val OK
$ etcdctl put foo1 foo1val OK
$ etcdctl put foo2 foo2val OK
Then try and get them, sorting by CREATE, I expect foo3, foo1, and foo2, but instead I get foo1, foo2, and foo3:
$ etcdctl get --sort-by=CREATE foo foo4
foo1 foo1val foo2 foo2val foo3 foo3val
The text was updated successfully, but these errors were encountered: