feat(metadata): state transfer for snapshot and client table - #3765
Open
numinnex wants to merge 15 commits into
Open
feat(metadata): state transfer for snapshot and client table#3765numinnex wants to merge 15 commits into
numinnex wants to merge 15 commits into
Conversation
# Conflicts: # core/common/src/error/iggy_error.rs # core/consensus/src/client_table.rs # core/consensus/src/metadata_helpers.rs # core/integration/tests/cluster/client_table_restart.rs # core/metadata/src/impls/metadata.rs # core/metadata/src/impls/recovery.rs # core/metadata/src/lib.rs # core/sdk/src/vsr.rs # core/server-ng/src/bootstrap.rs # core/server-ng/src/dispatch.rs
# Conflicts: # core/consensus/src/impls.rs # core/shard/src/lib.rs
Master's clients_table_max knob (#3756) calls set_capacity after install_client_table, but WAL-replay recovery repopulates the table before bootstrap reaches either call, so every restart with a registered client tripped the "set_capacity must run before any client registers" assert and the node refused to boot. Order the capacity set before the install, build the recovered table at the configured capacity instead of the compile-time default, and plumb the same knob into the shard's state-transfer decode so an installed table never falls back to the default either. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Checkpoints are node-local, so a healthy serving primary can offer a snapshot behind the receiver's own applied frontier (a backup checkpoints an op or two below the primary it later replaces). The install blindly restored that snapshot in place, rewinding the state machine below commit_min with no way back: the commit walk never revisits ops it already counted as applied, so the rewound-over effects were silently lost. Keep the local STM in that case and install only the client table, which comes from the serving primary's live state and is never behind. Caught by new checkpoint-shaped state-transfer specs (restart exactly at a drained journal, multiple snapshot generations, double restart), which also grow the harness with ANSI-stripped stdout markers and an occurrence counter, and promote the forced-checkpoint log to info so tests can pin checkpoint placement. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
server-ng has served HTTP for a while (roster bind, advertised addresses, vsr-only http_rbac/http_tls suites), but two race tests still excluded the transport under vsr behind a stale "server-ng exposes no HTTP listener" note that came back with a stash-pop. Unify the concurrent-addition matrix (80 cells in both modes) and the segment-rotation race to all four transports; the 20 HTTP cells and the rotation race run green against a 3-node vsr cluster. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3765 +/- ##
============================================
- Coverage 74.91% 74.87% -0.04%
Complexity 969 969
============================================
Files 1307 1307
Lines 152252 152157 -95
Branches 127684 127666 -18
============================================
- Hits 114052 113922 -130
+ Misses 34682 34642 -40
- Partials 3518 3593 +75
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.