Repository navigation
Recover acknowledged own-shard WAL before cleanup after restart - #429
Merged
Merged
Conversation
beinan
marked this pull request as ready for review
October 21, 2026 06:57
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.
A restarted worker can acknowledge a cleanup merge without recovering its durable, unsealed WAL: ordinary flush is a no-op until a new append opens the resident writer. Add explicit ingestion-owner cleanup preparation that replays this worker's existing shard, seals it, and prepares the normal bounded merge. Worker rollout/generic HTTP cleanup and timed cleanup select this path, so recovery does not require a new application write.
The existing cleanup/prepare APIs retain their resident-only flush semantics. Native masters use those APIs to merge a live worker's sealed generations without claiming its ingestion epoch. The new recovery API requires exclusive ownership of the ingestion writer ID, just like append; it does not authorize takeover of a live legacy worker. Ordinary flush, count-only merge, pinned reads and absent shards remain cheap. Cold maintenance replay is serialized once per process and uses the normal writer configuration so subsequent ingestion retains normal generation sizes. Lance's memory ceilings are soft for indivisible entries.
Validation: