You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I try a txn operation as below,data inconsistency happen.
$ etcdctl --endpoints=127.0.0.1:23791,127.0.0.1:23792,127.0.0.1:23793 txn --interactive
compares:
value("foo") = "bar"
success requests (get, put, delete):
put fo foo
get foo --rev=45
failure requests (get, put, delete):
Error: etcdserver: mvcc: required revision has been compacted
$ cluster etcdctl --endpoints=127.0.0.1:23791 get fo
fo
abc
$ cluster etcdctl --endpoints=127.0.0.1:23792 get fo
fo
foo
$ cluster etcdctl --endpoints=127.0.0.1:23793 get fo
fo
foo
$ cluster etcdctl --endpoints=127.0.0.1:23791 get fo -wjson
{"header":{"cluster_id":8027795201070719271,"member_id":10950272157435204962,"revision":71,"raft_term":9},"kvs":[{"key":"Zm8=","create_revision":57,"mod_revision":71,"version":9,"value":"YWJj"}],"count":1}
$ cluster etcdctl --endpoints=127.0.0.1:23792 get fo -wjson
{"header":{"cluster_id":8027795201070719271,"member_id":12585566857543715048,"revision":81,"raft_term":9},"kvs":[{"key":"Zm8=","create_revision":57,"mod_revision":81,"version":18,"value":"Zm9v"}],"count":1}
$ cluster etcdctl --endpoints=127.0.0.1:23793 get fo -wjson
{"header":{"cluster_id":8027795201070719271,"member_id":11002632744264117227,"revision":81,"raft_term":9},"kvs":[{"key":"Zm8=","create_revision":57,"mod_revision":81,"version":18,"value":"Zm9v"}],"count":1}
because revision 45 had been compacted, so txn success operations will fail in the middle, key "fo" original value is "abc", so the txn do nothing on node1, but it put the value "foo" on node2 and node3!!! And "revision" is different too.(I try it many times, so node1's revision is 71, node2's and node3's revision is 81.)
I just test it for learning. Is that test is illegal and not be allowed? Or is it a bug?
Because the txn is failed, my expectation is nothing will be done by the txn. If it is impossible, at least "put fo foo" should apply to all nodes to keep consistently. But it isn't.
On the other hand, I need some help to repair the inconsistent data. I restart the etcd cluster, but it doesn't work.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm a new user of etcd,and I setup the etcd's cluster by docker on the same machine.
etcd's cluster info as below:
when I try a txn operation as below,data inconsistency happen.
because revision 45 had been compacted, so txn success operations will fail in the middle, key "fo" original value is "abc", so the txn do nothing on node1, but it put the value "foo" on node2 and node3!!! And "revision" is different too.(I try it many times, so node1's revision is 71, node2's and node3's revision is 81.)
I just test it for learning. Is that test is illegal and not be allowed? Or is it a bug?
Because the txn is failed, my expectation is nothing will be done by the txn. If it is impossible, at least "put fo foo" should apply to all nodes to keep consistently. But it isn't.
On the other hand, I need some help to repair the inconsistent data. I restart the etcd cluster, but it doesn't work.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions