Skip to content

fix(shard): keep a parked prepare's stamp and op order on re-dispatch - #4005

Merged
spetz merged 6 commits into
masterfrom
shard_reconcilation_loop_redispatch_fix
Sep 1, 2026
Merged

fix(shard): keep a parked prepare's stamp and op order on re-dispatch#4005
spetz merged 6 commits into
masterfrom
shard_reconcilation_loop_redispatch_fix

Conversation

@numinnex

@numinnex numinnex commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Partition prepares can arrive before their namespace is
materialised. Re-dispatch through the shard inbox lost each
frame's original epoch stamp and placed it behind newer frames.
A delete and recreate could therefore serve an old prepare
against the replacement, while the backup gap check could drop
a later operation before the parked prefix reached the plane.

Stage parked frames in a shard-local FIFO and carry their epoch
and park-pass provenance. A biased pump arm processes one
staged frame per iteration after ticks and before inbox work.
This preserves order without delaying heartbeats behind a
bounded queue, and loopback runs after every delivery so a solo
primary commits re-dispatched requests immediately. Shutdown
uses the same ordering.

Simulator materialisation now passes its resolved epoch and
wakes the pump after off-pump staging. Seeded three-replica and
solo-primary tests pin queue ordering, wakeup, loopback, and
deterministic replay. Quiescence rejects stranded redispatch
work.

The integration oracle now filters gap markers to the partition
plane, removes ambient RUST_LOG when an explicit logging level
is configured, and falls back to the server log when verbose
mode inherits stdout. Dropped or rejected staged frames are
counted, and recovery documentation reflects same-view repair.

The shared leader-redirection BDD fixture could elect replica 1
when a loaded runner delayed replica 0 during concurrent
startup. Start replica 1 only after replica 0 is healthy and use
a wider fixture heartbeat window so the scenarios test client
redirection instead of container scheduling.

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Aug 31, 2026
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.73494% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.00%. Comparing base (328b289) to head (03d2590).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
core/shard/src/router.rs 71.42% 12 Missing and 4 partials ⚠️
core/shard/src/lib.rs 92.92% 7 Missing ⚠️
core/simulator/src/lib.rs 98.29% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4005      +/-   ##
============================================
- Coverage     85.00%   85.00%   -0.01%     
  Complexity     1402     1402              
============================================
  Files          1225     1226       +1     
  Lines        180283   180538     +255     
  Branches     146587   146845     +258     
============================================
+ Hits         153248   153460     +212     
- Misses        22993    23016      +23     
- Partials       4042     4062      +20     
Components Coverage Δ
Rust Core 85.89% <88.77%> (-0.01%) ⬇️
Java SDK 67.29% <ø> (ø)
C# SDK 75.38% <ø> (+0.01%) ⬆️
Python SDK 90.06% <ø> (ø)
PHP SDK 85.65% <ø> (ø)
Node SDK 96.22% <ø> (-0.03%) ⬇️
Go SDK 69.35% <ø> (+0.03%) ⬆️
Files with missing lines Coverage Δ
core/server/src/partition_reconciler.rs 97.82% <100.00%> (-0.10%) ⬇️
core/shard/src/metrics.rs 86.55% <ø> (ø)
core/simulator/src/lib.rs 97.01% <98.29%> (+0.08%) ⬆️
core/shard/src/lib.rs 82.19% <92.92%> (-0.52%) ⬇️
core/shard/src/router.rs 78.40% <71.42%> (+0.13%) ⬆️

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

spetz
spetz previously approved these changes Sep 1, 2026
@spetz
spetz merged commit 3aed9f4 into master Sep 1, 2026
95 checks passed
@spetz
spetz deleted the shard_reconcilation_loop_redispatch_fix branch September 1, 2026 14:14
@github-actions github-actions Bot removed the S-waiting-on-review PR is waiting on a reviewer label Sep 1, 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.

3 participants