Skip to content

fix(shard): drive metadata repair and the commit walk from the tick - #4008

Open
numinnex wants to merge 4 commits into
masterfrom
metadata_repair_and_commit_from_tick
Open

fix(shard): drive metadata repair and the commit walk from the tick#4008
numinnex wants to merge 4 commits into
masterfrom
metadata_repair_and_commit_from_tick

Conversation

@numinnex

Copy link
Copy Markdown
Contributor

A metadata backup that fell behind had no way back on its own, the same starvation the partition plane just had. A follower advances commit_max from every prepare header in replicate_preflight, before the gap check drops the prepare, so the commit heartbeat lands as Accepted rather than Advanced and the arming site inside that branch never fires. Under sustained metadata traffic the gap wedged until an unrelated view change. The same starvation left a backup holding resident committed ops that nothing re-drove, since the follower walk runs at the tail of an accepted prepare and the gap check returns before it.

▎ The metadata tick now evaluates the same two level-triggered checks the partition driver uses, off one probe. A hole below commit_max arms the existing repair against the primary, debounced on the repair retry interval. Resident committed ops re-drive the walk, follower only, because a backup's walk ships no wire replies while a stranded primary is resume_stranded_commits' job. A gap below the serving peer's retention floor needs no special handling: the serve path answers RangeEvicted and the existing conversion arms a state transfer.

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

Copy link
Copy Markdown
Contributor Author

Merge after #4006

@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.63972% with 61 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.94%. Comparing base (c8ef3b9) to head (d5c8ba1).
⚠️ Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
core/simulator/src/lib.rs 92.37% 33 Missing and 13 partials ⚠️
core/shard/src/lib.rs 96.24% 15 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4008      +/-   ##
============================================
- Coverage     84.91%   83.94%   -0.98%     
  Complexity     1405     1405              
============================================
  Files          1224     1225       +1     
  Lines        179327   180931    +1604     
  Branches     145615   147219    +1604     
============================================
- Hits         152273   151879     -394     
- Misses        23026    25083    +2057     
+ Partials       4028     3969      -59     
Components Coverage Δ
Rust Core 85.90% <94.63%> (+0.10%) ⬆️
Java SDK 67.35% <ø> (ø)
C# SDK 52.64% <ø> (-22.76%) ⬇️
Python SDK 90.06% <ø> (ø)
PHP SDK 85.65% <ø> (ø)
Node SDK 96.18% <ø> (+0.04%) ⬆️
Go SDK 69.36% <ø> (+0.03%) ⬆️
Files with missing lines Coverage Δ
core/metadata/src/impls/metadata.rs 88.42% <100.00%> (+0.36%) ⬆️
core/partitions/src/iggy_partition.rs 89.74% <100.00%> (+0.14%) ⬆️
core/server/src/partition_reconciler.rs 97.86% <100.00%> (-0.10%) ⬇️
core/shard/src/metrics.rs 87.74% <100.00%> (+1.18%) ⬆️
core/shard/src/router.rs 78.58% <100.00%> (+0.31%) ⬆️
core/shard/src/lib.rs 83.57% <96.24%> (+1.38%) ⬆️
core/simulator/src/lib.rs 96.22% <92.37%> (-0.73%) ⬇️

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

@numinnex
numinnex force-pushed the metadata_repair_and_commit_from_tick branch from 1a9fbc3 to d5c8ba1 Compare August 31, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review PR is waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant