Skip to content

docs: scheduler improvement backlog and migration order - #335

Merged
beinan merged 1 commit into
lance-format:mainfrom
beinan:docs/scheduler-improvement-backlog
Oct 8, 2026
Merged

beinan merged 1 commit into
lance-format:mainfrom
beinan:docs/scheduler-improvement-backlog

Conversation

@beinan

@beinan beinan commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Part of #333. Companion to #334.

What

Adds docs/design/scheduler-improvement-backlog.md: the defects in the current maintenance scheduling layer, grouped by severity with file:line references, and the ordered P0–P4 plan to fix them.

Highlights:

Validation

Docs only. typos clean locally.

🤖 Generated with Claude Code

Companion to the unified scheduler design. Lists the architectural,
correctness, operability and code-health defects in the current
maintenance scheduling layer with file:line references, and the P0-P4
order in which to fix them with mixed-version rules for each phase.

Headline numbers: 11 loops, 4 pacing mechanisms, 5 backoff systems,
3 admission surfaces, 27 etcd key families, ~71 env knobs, 6 per-table
allowlists; ~35 of the last 50 merged PRs touch this layer.

Refs lance-format#333.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@beinan
beinan merged commit f2c49fb into lance-format:main Oct 8, 2026
beinan added a commit that referenced this pull request Oct 8, 2026
Part of #333. Addresses the review comments on #334/#335.

## Changes to the design

| Review point | Change |
|---|---|
| One assignment per table re-serialises merge and compaction |
Invariant 1 is now *one write-turn holder* per table; preparation units
run concurrently with the turn holder and each other (§4.3, §4.5, §7).
Explicit: never re-serialise merge behind preparation (#308, #327). |
| Strict class order + in-class aging still starves commit-ready
compaction under a hot merger | Two hard bounds in §4.2:
`max_consecutive_turns[kind]` (applies across classes, incl. class 1)
and `max_turn_wait_secs[kind]` promoting to class 1. Invariant 5
rewritten. |
| Delta demand events race and get overwritten; stale snapshots can hide
progress | Per-shard watermarks (`sealed_through_seq`), max-merge per
shard, sum across shards; snapshot lowers a watermark only with a newer
observed revision; new invariant 5a (idempotent folding). |
| `bytes_free` heartbeat is a sample, not a reservation | Assignments
carry `reserved_bytes`; headroom = `bytes_total − Σ reserved` over live
assignments, rebuilt from etcd on failover; executor still enforces
local budget (§4.4). |
| Shadow phase would leave a scheduling gap | P1 keeps all loops
running; scanner *additionally* writes demand; per-table switch only
after the fleet is homogeneous (§8, backlog P1/P2 and mixed-version
rules). |
| Isolating legacy RPCs is not recovery | Stated explicitly in §4.4 and
backlog C3: isolation bounds blast radius; stall detection stays on the
execution's actual read/encode/commit progress. |

## Factual corrections

- `generate_id()` is UUIDv7 (`core/src/id.rs:28`): the queue is
approximately enqueue-time ordered; what it lacks is priority. Backlog
§0 and C6 corrected.
- `failure.rs:74-79` parses line/column as `u32`, so renumbering is
safe. What breaks it is a path move, crate rename, or a change in how
Lance wraps `InvalidInput`. C1 corrected.

Docs only; `typos` clean.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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