Repository navigation
feat(wal): persist immutable publication plans - #407
Merged
Merged
Conversation
50 of 56 tasks
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.
Summary
A publisher takeover must recover the transaction and source selection already being prepared. Persist immutable publication plans through the catalog group's durable quorum path, retain them across ownership changes and snapshots, and return the original plan index for exact retries under the current authority.
Plans keep independent source-group cursors and a fixed Lance target. Shared immutable metadata avoids copying the selected record list into each table view. Separate command, source-byte and active-plan limits bound admission; registered record sizes must fit the publication budget. Checkpoint decoding validates plan state and rejects noncanonical maps.
The optional application/checkpoint format advances to v3 and rejects v1/v2 directories. This increment retains pending plans; source pins, descriptor CAS, external Lance outcome resolution and reclamation remain separate work. A stored plan does not authorize an external commit or payload deletion.
Refs #378.
Testing
The complete repository CI helper passed: 605 workspace Rust tests, Python 229 passed / 2 skipped / 1 expected failure, formatting, Clippy, Ruff and Pyright. All-feature WAL Clippy, server build and workspace packaging also passed.
All 66 focused Rust tests passed, including real TCP process takeover, isolated retries, snapshot transfer, full restart, large metadata and inner-state corruption regressions. The record-budget regression failed before the admission/restoration guards and passed after them.
The process test routes source proposals to the elected source-group leader; the corrected regression passed 20 consecutive runs. All seven checkpoint corruption mutations now execute, including the three pending-plan cases. The complete qualification above passed again on the final corrected head.