-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move state machine replication off of AppendEntries RPC path.
With this change, we are also caching entries which come from the leader replication protocol. As entries come in, we append them to the log and then cache the entry. When it is safe to apply entries to the state machine, we will take them directly from the in-memory cache instead of going to disk. Moreover, and most importantly, we are not longer blocking the AppendEntries RPC handler with the logic of the state machine replication workflow. There is a small amount of async task juggling to ensure that we don't run into situations where we would have two writers attempting to write to the state machine at the same time. This is easily avoided in our algorithm. closes #12 closes #76
- Loading branch information
Showing
4 changed files
with
158 additions
and
31 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