doc: one execution path for index peeks - #38449
Conversation
|
Fact-check of the document against the implementation, posted by Claude Code on behalf of @antiguru. Checked at Nine wrong or unverifiable claims, plus smaller ones. The document was reconciled once already in Critical1. A quotation attributed to the code exists nowhere in the repo. Lines 65-68 put in quotation marks: "A fresh walk over the same trace: the iterator that produced 2. Cancellation state 2 is not a state. Lines 441-443: "Mid inline slice. The slice is bounded by the inline budget, so it finishes, and cancellation is observed before promotion." Nothing observes cancellation there. 3. The retention invariant is false for every non-streamable peek. Lines 287-291 state that each scan holds at most 4. Layer 1's described content is not in layer 1. Lines 577-579 credit Important5. " 6. The Deleted list contains a non-change. Line 509-510 lists " 7. The stack deletes a documented user-facing metric and the Deleted list omits it. 8. Cursor setup neither sums slices nor mixes substrates. Lines 429-433 claim the error scan, cursor setup, row iteration and result sort timers each sum the slices a walk was cut into and, for a promoted walk, mix worker time with the task's. 9. Present-tense claims about code the stack already replaced, outside the section scoped to the base tree. Lines 192-196, inside ### The scan, say Minor
Sections that check outAll five new dyncfgs by name, default and scope, and the three-against-two scope split with its rationale. The dyncfg arithmetic, seven added against two removed, net +5, verified by diffing |
503a50e to
4fbd5f2
Compare
|
Findings addressed, posted by Claude Code on behalf of @antiguru. Every wrong claim from the fact-check is corrected, and the document is updated for what the stack does after this round of review. Corrected. The quotation attributed to the code that exists nowhere in the repo. The fifth cancellation state, which is not a state: a cancellation landing mid inline slice arrives in one of the other four, because the worker inserts the promoted peek and returns within the same turn while Updated for the stack. All five parameters are replica-scoped, so the argument for pinning three of them environment-wide is gone. The permit bound is a nano-fraction of a runtime's workers rather than a count with a sentinel, and the section says how far one semaphore reaches and what a saturated bound does to the runtime's worker threads. A peek waiting on its turn keeps the worker from parking rather than asking timely to wake it. Fuel is charged only for positions a walk inspects, and the charge is independent of how the walk is sliced. The result-size ceiling bounds a stashed answer across the workers that produced it. The stash transition ships default-on and is outside the kill switch's rollback, which Kill switch now states. Provenance. The measurements name where they came from and say they are one-off staging observations from a driver not in the repository, rather than reading as reproducible numbers. The diagram shows the exits a walk actually has instead of two of them. |
Design document for unifying how a fast-path index peek is executed. Before the stack below it, an inline peek walked the arrangement until it had collected a threshold of bytes, then discarded that work and deferred to the stashing path, which walked the same prefix again. The document argues for one scan type with two placements, and for treating the stash as a state transition of a single scan rather than a restart of a different one. It also records what the scan's budget may be denominated in: consumed cursor positions, not elapsed time. The document sits at the top of the stack so that it describes what the PRs beneath it actually built rather than what they were expected to build.
78bbe4b to
4d19b91
Compare
Design document for unifying how a fast-path index peek is executed.
Before the stack below it, an inline peek walked the arrangement until it had collected a threshold of bytes, then discarded that work and deferred to the stashing path, which walked the same prefix again. The document argues for one scan type with two placements, and for treating the stash as a state transition of a single scan rather than a restart of a different one. It also records what the scan's budget may be denominated in: consumed cursor positions, not elapsed time.
The document sits at the top of the stack rather than the bottom, so it describes what the PRs beneath it actually built rather than what they were expected to build. Those are #38507 (bounding the unbudgeted parts of the scan), #38508 (
PeekScan, one budgeted scan across both phases), #38509 (the offload, the permit and the tokio driver) and #38510 (the stash as a state transition of that same scan).🤖 Opened by Claude Code on behalf of @antiguru