feature: topology module
It encapsulates the logics of a JoinRequest batch processing. Topology module will be quite important in picodata. This first version misses a lot of features, but a few commits later it's going to implement quite a lot of logics. When a new instance is joined - there's one complex thing: raft leader has to decide where this new instance is going to be emplaced, i.e. what replicaset should it join. There're many different parameters have an influence - `repliction_factor`, `failure-domain`, and of course the existing topology. So, this new `topology` module must make the decision. This patch only refactors the current Picodata behavior, and doesn't bring new features for its users. Instead, it opens the door to a future development. Also, this patch provides a unit-testing basis for the future features.
parent
9147c156
No related branches found
No related tags found
Showing
- Cargo.lock 52 additions, 3 deletionsCargo.lock
- Cargo.toml 2 additions, 0 deletionsCargo.toml
- src/traft/mod.rs 4 additions, 0 deletionssrc/traft/mod.rs
- src/traft/network.rs 1 addition, 2 deletionssrc/traft/network.rs
- src/traft/node.rs 22 additions, 34 deletionssrc/traft/node.rs
- src/traft/storage.rs 0 additions, 13 deletionssrc/traft/storage.rs
- src/traft/topology.rs 192 additions, 0 deletionssrc/traft/topology.rs
Loading
Please register or sign in to comment