Repository navigation
feat: let masters provision bounded WAL catch-up jobs - #299
Merged
Merged
Conversation
added 5 commits
October 3, 2026 20:34
beinan
marked this pull request as ready for review
October 3, 2026 21:05
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.
High WAL backlogs currently require an operator to provision recovery Pods. Add an opt-in controller inside the master that admits native catch-up Jobs from scanned WAL pressure or
POST /api/v1/catchup. Both entry points share table ownership checks, fleet capacity, deduplication, and durable retry budgets.GET /api/v1/catchup?target=...exposes Job identity, progress observations and recovery status.Each dedicated process claims one table and merges sealed WAL serially across configured shard identities under the existing storage fence, preserving live ingestion epochs. Durable etcd reservations survive master restarts and ambiguous Kubernetes responses. Ordinary scheduler claims exclude the reserved table; unrelated jobs continue. Jobs have explicit CPU/memory limits, no preemption and no runtime deadline at creation.
Recovery follows completed work rather than total elapsed time:
Defaults: disabled, four Jobs, 256 pending generations, 30-second observation interval, 1800-second soft slice/startup window, 600-second idle plus 60-second confirmation, 64 MiB/eight generations per batch, 1 GiB merge-buffer budget and 128 MiB shared cache. Failures back off across replacement and flag attention after three attempts. API callers cannot supply Pod specs, commands or force bypasses.
Activation requires namespace RBAC, a reviewed template with a pinned compatible image, and explicitly owned targets. All maintenance masters must understand the new catch-up discriminator. Older binaries can still enforce legacy runtime limits during rollout. Individual Lance index/storage calls lack internal progress checkpoints; large-table staging must validate idle thresholds and RSS. This does not migrate legacy writers, deploy production configuration, or evict ordinary workers.
Validation on
3065a9760f9787dfde3817e808b41458e9cb5ea8: 114 master tests (including isolated-etcd integration tests), 7 worker recovery tests, 5 manifest-scope tests and 15 coordinator tests passed. Clippy with--all-targets -D warningspassed for all four affected crates; formatting and diff checks passed. Coverage includes stale-progress/startup-phase CAS races, unchanged heartbeats, sampling gaps, survival past legacy runtime limits, ambiguous Job creation, UID protection, live ingestion and exact record conservation. All 10 GitHub checks passed, including Rust/Python tests, coverage, Clippy and builds on Linux x86_64/aarch64 and macOS arm64. No production mutations or real large-table staging run.