-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
raft issue: break linear consistency because of two leaders and raft lease read. #5352
Comments
isBlindFollower_ maybe cause split brain, A(leader)B(follower) C(followe), restart B and C, B start election |
why does B start election? |
start to election has gap |
Both leader is possible, but they are not same term. This is a very common case for raft.
|
I don't think this is a issue, reopen it if necessary |
But if there is data written to B now, it can be submitted successfully, but the read data is routed to A, then the data cannot be read or old. Does this cause inconsistency? |
I got your point. Read could be routed to A, but write to A won't be success anymore. So again, no inconsistency happened. |
It indeed break the linear consistency. nebula implement pure lease read but didn't implement checkquorum and read index as ETCD does. The old leader may read the stale data from old leader after new write over B and C(in shixiang's case). Although it's a small gap, nebula can't declare it implement a strong consistency. |
Perhaps you need to describe in more details how inconsistency happen. Liked I said in #5352 (comment), two leader doesn't mean split brain. Only when two leader of same term is. New leader of B or C can only trigger election after an election timeout passed. If B or C triggers election, which means, A's lease is valid as well. It won't serve read any more. |
Although I agree that blind follower that may break the precondition that election could only after an election timeout passed. I think we could remove the |
leader_ and isBlindFollower_ act the same, I think isBlindFollower_ == True eq leader_ == HostAddr("", 0)
We should increase the limit when voting. The follwer host leader_ != HostAddr("", 0) and leader lease valid recorded by the current host should refuse to vote to prevent split-brain
The text was updated successfully, but these errors were encountered: