Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #180
Changes
Prior to this branch, the Raft log would grow infinitely. This branch adds the ability to periodically take a full snapshot of the state machine, save it to disk, and delete the old log entries to save space, as well as transfer those snapshots over the network to lagging nodes.
1. Configuration & Triggers (config.rs, multi_raft.rs)
raft_snapshot_entry_threshold(default 10,000) with proper clap bounds validation.entries to cross this threshold, triggering a snapshot creation.
2. Storage Layer & Compaction (impls/metadata_storage.rs, storage.rs)
Index).
issuing a Range Tombstone to delete the covered LogEntry prefix.
is strictly contiguous.
3. Network Transfer & Validation (transient_state.rs, messages/rpc.rs)
chunks are strictly sequential, don't exceed SNAPSHOT_CHUNK_BYTES, and match the declared
size_bytes header.
4. The Staging State Machine (raft/state.rs, log_state.rs)
(overwriting the live MetadataState and self.peers) after the actor confirms it was safely written
to disk.
5. Integration Tests (it/raft/snapshot.rs)
network installation process, and node recovery from disk snapshots.