Skip to content

feat(consensus): add loopback queue for primary self-addressed messages#2825

Merged
hubcio merged 2 commits intomasterfrom
loopback-queue
Mar 3, 2026
Merged

feat(consensus): add loopback queue for primary self-addressed messages#2825
hubcio merged 2 commits intomasterfrom
loopback-queue

Conversation

@hubcio
Copy link
Contributor

@hubcio hubcio commented Feb 26, 2026

The primary was sending PrepareOk to itself through the message
bus, requiring a network round-trip and an unwrap() on bus
errors. Replace with an in-process VecDeque that the simulator
drains after each dispatch. Cleared on view change reset and
on DVC quorum completion.

Includes defensive debug_assert guards on push_loopback
overflow, process_loopback buf precondition, and simulator
drain idempotency. Adds test verifying loopback is cleared
when complete_view_change_as_primary fires.

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 73.79913% with 60 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.86%. Comparing base (4f1044d) to head (b41e202).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
core/shard/src/lib.rs 0.00% 36 Missing ⚠️
core/consensus/src/plane_helpers.rs 88.41% 19 Missing ⚠️
core/simulator/src/lib.rs 0.00% 4 Missing ⚠️
core/consensus/src/impls.rs 96.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2825      +/-   ##
============================================
+ Coverage     67.55%   67.86%   +0.31%     
  Complexity      739      739              
============================================
  Files          1049     1049              
  Lines         84169    84385     +216     
  Branches      60746    60972     +226     
============================================
+ Hits          56859    57271     +412     
+ Misses        24958    24736     -222     
- Partials       2352     2378      +26     
Flag Coverage Δ
csharp 67.43% <ø> (-0.19%) ⬇️
go 6.33% <ø> (ø)
java 54.83% <ø> (ø)
node 92.18% <ø> (-0.15%) ⬇️
python 0.00% <ø> (ø)
rust 70.18% <73.79%> (+0.47%) ⬆️

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

Files with missing lines Coverage Δ
core/consensus/src/impls.rs 42.48% <96.00%> (+27.09%) ⬆️
core/simulator/src/lib.rs 0.00% <0.00%> (ø)
core/consensus/src/plane_helpers.rs 57.60% <88.41%> (+37.03%) ⬆️
core/shard/src/lib.rs 0.00% <0.00%> (ø)

... and 22 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.

The primary was sending PrepareOk to itself through the message
bus, requiring a network round-trip and an unwrap() on bus
errors. Replace with an in-process VecDeque that the simulator
drains after each dispatch. Cleared on view change reset and
on DVC quorum completion.

Includes defensive debug_assert guards on push_loopback
overflow, process_loopback buf precondition, and simulator
drain idempotency. Adds test verifying loopback is cleared
when complete_view_change_as_primary fires.
@hubcio hubcio merged commit be23a35 into master Mar 3, 2026
74 checks passed
@hubcio hubcio deleted the loopback-queue branch March 3, 2026 09:56
kriti-sc pushed a commit to kriti-sc/iggy that referenced this pull request Mar 6, 2026
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.

4 participants