-
Notifications
You must be signed in to change notification settings - Fork 185
feat: initial support multi-raft #1534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bb42c5d to
b0e335e
Compare
|
There are some design issue with this PR, for example, should a IMHO, network sharing is a just a application level task to do, it does not require the lib(openraft) to add any feature to support it. |
b0e335e to
8d35dcb
Compare
|
PTAL again |
867a863 to
9f38ace
Compare
drmingdrmer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drmingdrmer reviewed 5 of 37 files at r1, 7 of 18 files at r2, 10 of 19 files at r3, 23 of 23 files at r4, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ariesdevil)
multiraft/src/network.rs line 40 at r4 (raw file):
{ /// Send AppendEntries to target node for a specific group. fn send_append_entries(
keep the method names aligned with the RaftNetworkV2 methods: without send_ prefix.
examples/mem-log/Cargo.toml line 18 at r3 (raw file):
[dependencies] openraft = { path = "../../openraft", default-features = false, features = ["type-alias", "tokio-rt"] }
why does it need to enable tokio-rt?
9f38ace to
3dd460b
Compare
|
Fixed, PTAL again. |
drmingdrmer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drmingdrmer reviewed 3 of 3 files at r5, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ariesdevil)
drmingdrmer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @ariesdevil)
Add Multi-Raft Support via
openraft-multiCrateSummary
This PR introduces Multi-Raft support for OpenRaft through a new standalone crate
openraft-multi.It provides network adapters for efficient connection sharing across multiple Raft groups within a single process.
This is a separate crate that does not affect the core
openraftcrate.Key Features
GroupedRpcon your router, getRaftNetworkV2for freeGroupIdtypesNew Components
GroupedRpctrait(target, group_id)routingGroupNetworkAdapterGroupedRpcimpl, auto-implementsRaftNetworkV2GroupNetworkFactory(factory, group_id)Fix: #1485
Checklist
This change is