-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
raft: Asserting current state storage access for term number when lea…
…der commits Currently, when the raft leader wants to commit an entry(advance commit index), it must check the term of the entry it wants to commit and ensure the term number is the same as the current leader term(term of itself). This may involve a storage access for the term number if the entry has been persisted on stable storage and no longer in the unstable log of the leader node. This change adds an assertion for this existing storage access for term by adding a scenario that triggers storage access in TestLeaderAppResp() and asserting storage has been called(logged by MemoryStorage.callStats.term) Jira issue: CRDB-45763 Fixes: #137826 Release note: None
- Loading branch information
Showing
1 changed file
with
47 additions
and
13 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