refactor(raft): migrate from openraft to raft-rs#104
Merged
Conversation
slow2342
force-pushed
the
refactor/migrate-to-raft-rs
branch
from
June 9, 2026 18:02
26b956e to
79953b8
Compare
Replace openraft with raft-rs (TiKV fork) for Raft consensus. The new architecture uses a dedicated thread event loop with crossbeam channels, a RocksDB-backed log store, and a RaftHandle trait that abstracts the raft implementation from the API layer. Use git dependency pinned to ad13f3d9 to fix RUSTSEC-2024-0437 (protobuf v2 stack overflow vulnerability).
slow2342
force-pushed
the
refactor/migrate-to-raft-rs
branch
from
June 9, 2026 18:04
79953b8 to
8db5b37
Compare
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.
Summary
Replace openraft with raft-rs (TiKV fork) for Raft consensus. The new architecture uses a dedicated thread event loop with crossbeam channels, a RocksDB-backed log store, and a RaftHandle trait that abstracts the raft implementation from the API layer.
Use git dependency pinned to
ad13f3d9to fix RUSTSEC-2024-0437 (protobuf v2 stack overflow vulnerability).Changes
Storagetrait.RaftHandleimpl communicating with event loop via channels.RaftHandle) for KvService/ClusterService.Testing
cargo buildsucceedscargo testpasses (10 tests)cargo runboots single-node cluster successfullyHow to verify