Conversation
…s can be used during restart
raakella1
force-pushed
the
restart_support
branch
from
September 14, 2026 08:55
f8c9179 to
073deec
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Restart recovery currently retains stale Raft objects, loses essential state across lifecycles, and can incorrectly advance the commit frontier.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds an in-memory registry intended to preserve replica and Raft state across restarts.
Changes:
- Replaces the singleton replica manager with a type-erased registry.
- Preserves journals, indexes, Raft logs, configuration, and membership.
- Refactors Raft/server lifecycle APIs and updates build metadata.
File summaries
| File | Description |
|---|---|
tools/craft_test_driver/cluster.py |
Adjusts logging configuration. |
tools/craft_reference_tcp_srv.cpp |
Creates and passes the registry. |
src/replica_mgr.hpp |
Removes the former replica manager. |
src/replica_mgr.cpp |
Removes its implementation. |
src/registry_mgr.hpp |
Adds the generic registry. |
src/raft/raft_state_manager.hpp |
Injects registry access. |
src/raft/raft_state_manager.cpp |
Stores Raft state in the registry. |
src/raft/raft_state_machine.hpp |
Adds registry ownership plumbing. |
src/raft/raft_service.hpp |
Refactors Raft service lifecycle. |
src/raft/raft_service.cpp |
Uses registry-backed peers and managers. |
src/raft/raft_replica.hpp |
Adds restart-oriented construction parameters. |
src/raft/raft_replica.cpp |
Restores replica data and membership. |
src/net/tcp_server.hpp |
Exposes registry and Raft options. |
src/net/tcp_server.cpp |
Constructs registry-aware replicas. |
src/mem/replica.hpp |
Makes journal and index shareable. |
src/mem/replica.cpp |
Migrates map access to shared storage. |
src/helper.hpp |
Adds registry-key generation. |
conanfile.py |
Bumps the package version. |
CMakeLists.txt |
Updates targets and source ownership. |
Review details
- Files reviewed: 19/19 changed files
- Comments generated: 5
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
raakella1
force-pushed
the
restart_support
branch
from
September 15, 2026 09:53
f729bb2 to
ece6698
Compare
…y- the log store and state machine persistence is enough
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.
To support test cases where the replicas need to be restarted, add a registry class which stores type erased key value pairs. Any component can store the values in the registry and recover from it in the constructor.