Skip to content

fix(ingest): preserve scan progress across worker claims - #472

Merged
beinan merged 1 commit into
mainfrom
codex/wal-preserve-worker-scan-progress
Oct 22, 2026
Merged

beinan merged 1 commit into
mainfrom
codex/wal-preserve-worker-scan-progress

Conversation

@beinan

@beinan beinan commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

A bounded source scan can encounter only records from other tables. The worker previously released its claim and discarded the scan cursor, then started from the same durable checkpoint on its next claim. A table behind more than one scan budget of retained foreign records could remain unpublished indefinitely.

Retain the empty-page scan hints per fixed worker assignment and move them through claim jobs. Hints are checked against the complete table binding, contain only quorum-observed ranges without that table's records, and never advance durable checkpoints. Scan limits, claim rotation and publisher fencing remain unchanged. Restart may rescan those ranges safely.

Refs #378. Built on merged #466, #468, #469, #470 and #471.

Validation:

  • Real three-replica WAL, etcd and Lance regression: a target behind 129 retained foreign records fails with the old worker and publishes its exact payload with the fix, while another table remains unpublished.
  • Materializer, worker, service and service/http-client feature Clippy checks; ingestion and etcd-backed worker recovery suites.
  • Full repository CI helper, including Rust/Python tests, formatting and lint/type checks.

The first worker-suite run encountered an existing lease-revoke timeout with slow local etcd synchronization. The unchanged suite passed on a fresh run with the same storage and deadlines; the original failure was retained. This change fixes publication progress and does not claim a throughput improvement.

@beinan
beinan force-pushed the codex/wal-preserve-worker-scan-progress branch from e71fbf1 to 0145aba Compare October 22, 2026 16:49
@beinan
beinan changed the base branch from codex/wal-distributed-preparation-public to main October 22, 2026 16:49
@beinan
beinan marked this pull request as ready for review October 22, 2026 16:49
@beinan
beinan merged commit 3976899 into main Oct 22, 2026
14 of 28 checks passed
beinan added a commit that referenced this pull request Oct 22, 2026
Queueing behind replication work and reading or validating an accepted
record currently contribute to the same fetch latency. Expose separate
cumulative queue and service timings in each group's local `/status`
observation, alongside found, missing, failed, and returned-byte counts.

Counters use fixed storage and saturating arithmetic. They cover
serviced requests, including callers that disconnect; queued work
discarded on shutdown is excluded. Queue timing starts after runtime
admission, and service timing excludes reply transmission. These local
wall-time observations do not establish quorum freshness or change
durable acknowledgements.

Refs #378. Built on merged #471 and #472.

## Testing

- Real blocked and failed storage-sync regression with both replication
modes: existing and missing-record fetches complete and are counted
before the unrelated sync, while the new append remains unacknowledged.
- Actual WAL service and Lance recovery fixture with full-column
readback and retained process identities.
- WAL all-feature/all-target Clippy and tests passed.
- Complete local CI-equivalent script passed: workspace formatting,
Clippy and all-target tests; Python tests (229 passed, 2 skipped, 1
expected failure), Ruff formatting/lint and Pyright.
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