-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change: to get last_log and membership, Storage should search for bot…
…h logs and state machines. Why: depending on the impl, a RaftStore may have logs that are included in the state machine still present. This may be caused by a non-transactional impl of the store, e.g. installing snapshot and removing logs are not atomic. Thus when searching for last_log or last membership, a RaftStore should search for both logs and state machine, and returns the greater one that is found. - Test: add test to prove these behaviors, which includes: `get_initial_state()` and `get_membership()`. - Refactor: Make store tests a suite that could be applied to other impl.
- Loading branch information
1 parent
6f3cc68
commit 79a3997
Showing
4 changed files
with
648 additions
and
336 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
Oops, something went wrong.