Repository navigation
fix(master): page the demand listing; stop treating average size as max - #367
Merged
Merged
Conversation
Review round 7, two code findings. GET /scheduler/demand without a target still did one unpaged prefix read of the whole cache, so at 13k tables it failed the same 4 MiB cap the planner was fixed for in lance-format#364. The listing is now a paged read reduced to a bounded summary: pending-sorted, default 200 and at most 2000 rows, idle tables excluded unless include_idle=true, with total_tables and tables_with_pending alongside. The full TableDemand record is returned only for a single-target query. Response size is now independent of cache size. The shadow byte estimate used pending_bytes / pending_generations - an average - where a maximum belongs. The append path reads a whole generation before checking the per-pass target, so the largest single generation is the real floor, and no publisher reports per-generation sizes yet. The estimate is now the executor's whole local budget for every unit, which is the only honest reservation for an unknown maximum. The spec says plainly that this makes the shadow capacity model answer "can one unit fit" and not "how many in parallel", and that placement_gap must not be read as a parallelism measurement. planner_shadow_reservation_basis_total{basis} and planner_shadow_average_generation_bytes record what each reservation was based on. Tests: the planner etcd test now also exercises the list view - paged, limit=1 returns only the pending table, record omitted, totals correct. 18 planner/routes tests pass; clippy -D warnings, fmt, typos clean. Refs lance-format#333. Review round 7. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
17 of 18 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.
Part of #333. Fixes the two code findings of review round 7 (credit: production review), which otherwise cleared a single-master shadow canary in production.
GET /scheduler/demandlist mode still one unpaged read → fails at 13k tableslimit(default 200, max 2000),include_idle,total_tables/tables_with_pending. Full record only for?target=. Response size independent of cache size.pending_bytes / pending_generations(an average) as the maxplacement_gapmust not be read as such.planner_shadow_reservation_basis_total{basis},planner_shadow_average_generation_bytesrecord the basis.Validation
Planner etcd test extended: list view with
limit=1returns only the pending table, record omitted,total_tables=2,tables_with_pending=1. 18 planner/routes tests green; clippy-D warnings, fmt, typos clean. Spec §2.3 and observability list updated.Finding 3 (real-traffic observation: master RSS, etcd latency, reconcile completion, merge progress, pending/503) is the canary itself, not code.
🤖 Generated with Claude Code