Skip to content

feat(wal): persist received Raft snapshots atomically - #403

Merged
beinan merged 1 commit into
lance-format:mainfrom
beinan:codex/wal-snapshot-install
Oct 20, 2026
Merged

beinan merged 1 commit into
lance-format:mainfrom
beinan:codex/wal-snapshot-install

Conversation

@beinan

@beinan beinan commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

A lagging replica can receive a Raft snapshot that replaces its uncommitted tail. Add GroupLog::install_snapshot to persist the accepted snapshot, optional Ready suffix, HardState and application binding in one synced engine batch, without changing sibling groups or node identity. Invalid or stale transitions are rejected; an uncertain engine write fences every group sharing the engine.

This is the storage boundary only. Callers must first validate and durably stage the application snapshot and retain its dependencies across uncertain outcomes. Application snapshot files, transfer and Node integration follow separately; this PR does not enable production ingestion or physical reclamation.

Refs #378.

Testing

  • 37 focused Rust tests passed, including actual RawNode Ready handling, divergent-tail replacement, invalid transitions, SIGKILL recovery and injected sync failure. Four ignored tests are child-process fixtures invoked by parent tests.
  • WAL Clippy with all features and targets passed; the received-snapshot integration suite is included in CI.
  • Complete repository CI helper passed: workspace formatting, Clippy and Rust tests; Python tests (229 passed, 2 skipped, 1 expected failure), Ruff and Pyright.
  • Server build and workspace packaging passed; validated source checksums remained unchanged.

@beinan
beinan merged commit 04aa0ef into lance-format:main Oct 20, 2026
11 checks passed
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.

1 participant