Skip to content

Data inconsistency caused by TXN with a Range on a compacted revision #18652

Answered by ahrtr
davidhenrygao asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks @davidhenrygao , and I reproduced this issue!

How to reproduce this issue

  • Step 1: start a brand new 3 member cluster
  • Step 2: Execute for i in {1..20}; do ./etcdctl put k$i v$i; done
  • Step 3: Execute ./etcdctl compact 21
  • Step 4: Execute ./etcdctl txn --interactive
compares:
value("k1") = "v1"

success requests (get, put, del):
put k2 foo
get k1 --rev=10

failure requests (get, put, del):

The client will get a **etcdserver: mvcc: required revision has been compacted** error.

  • Step 5: Execute ./etcdctl get k2 against different endpoints, you will get different values,
$ ./etcdctl --endpoints=127.0.0.1:2379 get k2
k2
v2
$ ./etcdctl --endpoints=127.0.0.1:22379 get k2
k2
foo
$ ./etcdc…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@ahrtr
Comment options

ahrtr Oct 2, 2024
Maintainer

@serathius
Comment options

@ahrtr
Comment options

ahrtr Oct 2, 2024
Maintainer

@ahrtr
Comment options

ahrtr Oct 2, 2024
Maintainer

@davidhenrygao
Comment options

Answer selected by davidhenrygao
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants