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

Inconsistent revisions across etcd instances #6626

Closed
nekto0n opened this issue Oct 11, 2016 · 11 comments
Closed

Inconsistent revisions across etcd instances #6626

nekto0n opened this issue Oct 11, 2016 · 11 comments
Labels

Comments

@nekto0n
Copy link

nekto0n commented Oct 11, 2016

Hi!
I am using the very latest etcd built from sources. I have a cluster consisting of 5 members. I have a lot of clients constanly updating keys.
If I create 5 test clients and start watching from each member and printing ModRevision I will see that some members are lagging behind, i.e I see watch responses with old revisions. E.g. at moment in time latest revision seen by each member looks like this

509862063 member5213
509724284 member7656
510546172 member7704
509724281 member7774
510481193 member-8190

We have staggering members (7774 and 7656) lagging behind about 600k revision. If I look at etcdctl endpoint status I see that RAFT INDEX is consistent across all members. But data is not.
Funny thing is: member 7656 is a leader and when we tried to reanimate 7774 (removing from cluster, wiping out data directory and bringing back), it dowloaded snapshot from lagging master and continued lagging behind.

Funny thing: it seems that members that report lower revision numbers - actually have newer key versions.

Any thoughts/suggestions where to dig further?

@xiang90
Copy link
Contributor

xiang90 commented Oct 11, 2016

What is the version of etcd are you running? Is it upgraded from a previous version? Can you share me the data dir?

@xiang90
Copy link
Contributor

xiang90 commented Oct 11, 2016

Also it would be great if you can reproduce this reliably. I suspect it is caused by some bugs in lease pkg.

@nekto0n
Copy link
Author

nekto0n commented Oct 11, 2016

It is built from latest master. Not upgraded. Data dir is about 10Gb and I guess I cannot share it because of the content. Sorry.

@nekto0n
Copy link
Author

nekto0n commented Oct 11, 2016

I suspect it is caused by some bugs in lease pkg.

Oh, how can that be? We have only one lease for a single key (for election).

@xiang90
Copy link
Contributor

xiang90 commented Oct 11, 2016

@nekto0n Can you try to reproduce this with an insensitive data set? Also sharing us the way to reproduce would be super helpful.

@xiang90
Copy link
Contributor

xiang90 commented Oct 12, 2016

Funny thing: it seems that members that report lower revision numbers - actually have newer key versions.

@nekto0n Can you clarify this more?

@nekto0n
Copy link
Author

nekto0n commented Oct 12, 2016

I'm afraid it was a false alarm and I somehow managed to build etcd from older master (before fixes to lease management), so I guess this behavior is expected.

@xiang90
Copy link
Contributor

xiang90 commented Oct 12, 2016

so I guess this behavior is expected.

Which behavior?

@nekto0n
Copy link
Author

nekto0n commented Oct 12, 2016

Inconsistent revision numbers across replicas (I guess), still not quite sure what happened.

@xiang90
Copy link
Contributor

xiang90 commented Oct 12, 2016

One potential cause is that some of your machines are really slower than others. raft commands replication is actually faster than commands apply on HDD. raft replication == seq writes + net io, apply command = random io. Thus you might see same raft index but different revisions. But this is a guess.

@nekto0n
Copy link
Author

nekto0n commented Oct 12, 2016

I think we can close this. We'll be observing our installations more carefully and check your guess.

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

No branches or pull requests

2 participants