Skip to content

feat(cluster)!: recover voters safely and admit nonvoting learners - #5116

Open
spetz wants to merge 1 commit into
masterfrom
recover_voters
Open

spetz wants to merge 1 commit into
masterfrom
recover_voters

Conversation

@spetz

@spetz spetz commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

One storage fault could lose a committed operation. A voter that
acknowledged a prepare and then lost its disk, or came back from an
older disk image with the same identity, still counted as an intact
voter: its vote could nack the operation away, and a vote it sent
before the fault could still elect a view without it. Nothing let a
node outside the static roster join a cluster either.

Every restarted voter now treats its storage as possibly old until
fresh replies from every other voter of its group bound its view and
its log is proven. A vote carries the boot incarnation of its sender,
and a voter counts it only for the incarnation it registered through
a challenge, so a vote of an earlier life never counts again. An
untrusted vote adds copies to the merge and never a nack. A voter
never acknowledges below a view it voted in, and a primary whose
members cannot acknowledge steps down. A partition copy that never
built its history neither acknowledges nor blocks a fresh election,
while a partition whose every copy was lost waits as before. The
first durable bootstrap needs the whole roster. Reads and checkpoint
publication wait for that proof, and operators see it in a log line,
a gauge and the storage revision file.

An operator with manage_servers reserves a slot for a new node with a
one-time join secret. The node joins through an authenticated seed,
binds its disk to the slot once, and follows committed metadata as a
learner that never votes or acknowledges. Membership and operation
progress are readable over the binary protocol, HTTP, the Rust SDK and
the CLI, and the existing cluster metadata response is unchanged.

A bounded model of the handover planned for live reconfiguration runs
the production quorum rules, view merge and suffix codec, and every
guard it relies on fails a pinned counterexample when disabled.
Clients send operation 152, which the metadata primary resolves into
internal operation 77, and seeds bind disks with operation 78. The
replica wire revision moves to 7 and the metadata snapshot format to
22, so upgrading from revision 6 needs a coordinated stop.

Relates to #5110

@spetz spetz added server iggy-server related change breaking:storage On-disk data format change - skips backwards compat CI breaking:replica-to-replica-protocol Replica-to-replica protocol change. No version negotiation; requires coordinated restart. labels Nov 29, 2026
@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Nov 29, 2026
@codecov

codecov Bot commented Nov 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.53201% with 194 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.30%. Comparing base (b179e96) to head (f39e433).

Files with missing lines Patch % Lines
core/consensus/src/configuration.rs 88.52% 45 Missing ⚠️
core/consensus/src/impls.rs 94.96% 36 Missing and 2 partials ⚠️
core/common/src/wire_conversions.rs 77.35% 11 Missing and 13 partials ⚠️
core/consensus/src/observability.rs 0.00% 12 Missing ⚠️
core/consensus/src/vsr_state.rs 97.45% 7 Missing ⚠️
...c/commands/binary_cluster/get_cluster_operation.rs 81.25% 5 Missing and 1 partial ⚠️
core/consensus/src/plane_helpers.rs 99.13% 6 Missing ⚠️
core/cli/src/args/cluster.rs 94.44% 5 Missing ⚠️
...src/commands/binary_cluster/get_cluster_members.rs 80.76% 3 Missing and 2 partials ⚠️
core/cli/src/main.rs 87.17% 4 Missing and 1 partial ⚠️
... and 16 more

❌ Your patch check has failed because the patch coverage (27.57%) 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    #5116      +/-   ##
============================================
+ Coverage     92.26%   92.30%   +0.04%     
+ Complexity     4367     4366       -1     
============================================
  Files          1592     1625      +33     
  Lines        436807   447871   +11064     
  Branches     365039   376022   +10983     
============================================
+ Hits         403019   413414   +10395     
- Misses        28172    28698     +526     
- Partials       5616     5759     +143     
Components Coverage Δ
Rust Core 93.58% <95.53%> (+0.02%) ⬆️
Java SDK 81.03% <ø> (+<0.01%) ⬆️
C# SDK 86.33% <ø> (-0.08%) ⬇️
Python SDK 85.41% <ø> (+0.01%) ⬆️
PHP SDK 90.42% <ø> (ø)
Node SDK 97.26% <ø> (-0.01%) ⬇️
Go SDK 73.64% <ø> (-0.04%) ⬇️
C++ SDK 85.44% <ø> (ø)
Files with missing lines Coverage Δ
core/binary_protocol/src/codes.rs 100.00% <ø> (ø)
core/binary_protocol/src/consensus/commit_batch.rs 98.24% <100.00%> (+0.74%) ⬆️
core/binary_protocol/src/consensus/header.rs 89.56% <100.00%> (+0.95%) ⬆️
core/binary_protocol/src/consensus/operation.rs 98.66% <100.00%> (+0.19%) ⬆️
core/binary_protocol/src/dispatch.rs 90.19% <100.00%> (+0.26%) ⬆️
...ry_protocol/src/primitives/metadata_changes/mod.rs 100.00% <ø> (ø)
...protocol/src/requests/cluster/bind_cluster_node.rs 100.00% <100.00%> (ø)
...otocol/src/requests/cluster/get_cluster_members.rs 100.00% <100.00%> (ø)
...ol/src/requests/cluster/manage_cluster_resolved.rs 100.00% <100.00%> (ø)
...y_protocol/src/responses/cluster/manage_cluster.rs 100.00% <100.00%> (ø)
... and 123 more

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

This branch has not been deployed

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

Labels

breaking:replica-to-replica-protocol Replica-to-replica protocol change. No version negotiation; requires coordinated restart. breaking:storage On-disk data format change - skips backwards compat CI S-waiting-on-review PR is waiting on a reviewer server iggy-server related change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant