-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvserver: avoid race in preSplitApply
When `splitPreApply` has to handle a right-hand side replica that is newer than the split, the split needs to throw the "snapshot" it was going to install into the right-hand side away. It does so by deleting all data in the RHS and replacing the raft state bits. It is using the RHS replica's stateloader to that effect, but didn't actually hold the raftMu to make this safe. The mutex acquisition has been added. Fixes #86669. No release note since the bug shouldn't be visible to end users (it is very rare in the first place, and having noticeable effect even rarer), and if so it would likely look like unspecific Raft corruption that will be hard to trace back to this race. Release justification: this will merge on master only after branch cut. Release note: None
- Loading branch information
Showing
2 changed files
with
34 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters