-
Notifications
You must be signed in to change notification settings - Fork 3.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
storage: proposal quota and bad replicas #18342
Comments
Ignoring replicas in this state for proposal quota purposes would effectively leave the range under-replicated, which is dangerous. We need for the rebalancer to consider these ranges bad and rebalance away from them. (We probably need to do both, though. The rebalance operations can't proceed if the quota pool is blocking all writes) |
@bdarnell That's a good point and one that @andreimatei or @tschottdorf mentioned as well in person. Seems feasible to feed the "wedged replica" signal into the rebalancer too. |
@petermattis, could I have a try for this? |
@a6802739 Sure. It is probably worthwhile to sketch out what you're going to do in this issue first. |
Great! Thanks! |
petermattis, Now the method we used to check whether a follower is active is just like:
If we want to change the logic here, how about we use the
Like the method you said above:
Honestly, I still quite don't understand what is the Thank you very much. |
Raft is currently time agnostic. I doubt the maintainers would add a Proposal quota is used to limit the outstanding Raft proposals to a Range to prevent a slow Replica from continually falling too far behind and requiring a snapshot to be caught up. Cc @bdarnell |
@petermattis Thank you very much. Do you mean we should make a But how could we update LastUpdateTimestamp for each follower? |
@a6802739 Apologies for the delay in responding. This dropped off my radar.
Yes, something like that.
I think you have to snoop on the Raft message traffic. See |
#17524 revealed a bit of fragility in the use of proposal quota: a replica that is unable to make progress for some reason will freeze up the entire range even though 2 good replicas remain. The specific bug causing a replica to be unable to make progress is now fixed, but we should consider enhancing the proposal quota logic to lessen the impact of such bugs in the future.
The current proposal quota logic "finds the minimum index that active followers have acknowledged" and uses that value to determine when quota should be returned to the pool. An "active follower" is one that is on a healthy node where health is determined by the per-connection RPC heartbeats. This is an insufficient definition of health if a particular replica on an otherwise good node is having problems. When that occurs proposal quota is exhausted and the range will stop accepting writes.
Enhancing the proposal quota logic should be relatively straightforward. Rather than simply consider connection health, we could also have some measure of whether a replica has made any progress at all within a certain time period. For example, we could consider a follower inactive if its
progress.Match
has not changed in the last 10 seconds.Cc @nvanbenschoten, @tschottdorf
The text was updated successfully, but these errors were encountered: