Skip to content

feat(shard): create shard crate and generic IggyShard#2811

Open
krishvishal wants to merge 8 commits intoapache:masterfrom
krishvishal:abstract-shard
Open

feat(shard): create shard crate and generic IggyShard#2811
krishvishal wants to merge 8 commits intoapache:masterfrom
krishvishal:abstract-shard

Conversation

@krishvishal
Copy link
Contributor

  • Created shard crate and generic IggyShard
  • IggyShard::dispatch() routes incoming network messages to the correct consensus plane via PlaneIdentity

@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 0% with 124 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.38%. Comparing base (cca86fe) to head (ed75391).

Files with missing lines Patch % Lines
core/shard/src/lib.rs 0.00% 84 Missing ⚠️
core/simulator/src/replica.rs 0.00% 32 Missing ⚠️
core/simulator/src/lib.rs 0.00% 8 Missing ⚠️

❌ 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     
Flag Coverage Δ
csharp 67.06% <ø> (-0.19%) ⬇️
java 52.19% <ø> (ø)
rust 69.56% <0.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
core/simulator/src/deps.rs 0.00% <ø> (ø)
core/simulator/src/lib.rs 0.00% <0.00%> (ø)
core/simulator/src/replica.rs 0.00% <0.00%> (ø)
core/shard/src/lib.rs 0.00% <0.00%> (ø)

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@krishvishal krishvishal marked this pull request as draft February 24, 2026 16:01
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> = (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could import the variadic! macro in there and use it ?

B: MessageBus + Clone,
{
#[allow(clippy::too_many_arguments)]
pub fn new(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets pass in already constructed consensus, metadata instances in the constructor

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I've realized my mistake and refactored the code. I've pushed the refactor, please take a look now.

@krishvishal krishvishal marked this pull request as ready for review February 25, 2026 10:23
@krishvishal
Copy link
Contributor Author

@numinnex this is ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants