-
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: reorder leasePostApply on snapshot application
The snapshot application code was weird - it called leasePostApplyLocked() *before* doing r.mu.state = snapshot.state. This is different from the way it's called when a lease applies regularly through a raft command, where most of the command's effects on the replica state have already been applied (hence the "Post" in the name). This patch reorders things on snapshot application such that r.mu.state is updated before the leasePostApplyLocked call. Besides being sane, this comes in anticipation of leasePostApplyLocked using more elements of the replica state, and needing those to be up to date. Release note: None
- Loading branch information
1 parent
9c39719
commit 4a22463
Showing
4 changed files
with
38 additions
and
26 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
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