feat(shard): create shard crate and generic IggyShard#2811
feat(shard): create shard crate and generic IggyShard#2811krishvishal wants to merge 8 commits intoapache:masterfrom
shard crate and generic IggyShard#2811Conversation
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #2811 +/- ##
============================================
- Coverage 68.47% 68.38% -0.09%
Complexity 656 656
============================================
Files 852 853 +1
Lines 68221 68284 +63
Branches 59682 59755 +73
============================================
- Hits 46714 46696 -18
- Misses 19177 19246 +69
- Partials 2330 2342 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Decouple consensus construction from IggyShard so it becomes a thin message dispatch layer. The shard now receives pre-built IggyMetadata and IggyPartitions planes instead of constructing VsrConsensus internally. Consensus wiring moves to the caller (e.g. simulator).
| use partitions::{IggyPartitions, PartitionsConfig}; | ||
|
|
||
| // variadic!(Metadata, Partitions) = (Metadata, (Partitions, ())) | ||
| type PlaneInner<B, J, S, M> = ( |
There was a problem hiding this comment.
I think you could import the variadic! macro in there and use it ?
| B: MessageBus + Clone, | ||
| { | ||
| #[allow(clippy::too_many_arguments)] | ||
| pub fn new( |
There was a problem hiding this comment.
Lets pass in already constructed consensus, metadata instances in the constructor
There was a problem hiding this comment.
Yes, I've realized my mistake and refactored the code. I've pushed the refactor, please take a look now.
|
@numinnex this is ready for review. |
shardcrate and genericIggyShardIggyShard::dispatch()routes incoming network messages to the correct consensus plane viaPlaneIdentity