Repository navigation
perf(proxy): skip complete-range block probes - #223
Merged
Merged
Conversation
[Medium impact] The PR appears safe to merge; no new actionable issue remains. SummaryThe PR skips presence probes for larger ranges on entries marked
Reviews (6) · Last reviewed commit: "Merge origin/main into perfloop-pr-open-..." · Reviewed by Greptile |
perfloop
Bot
force-pushed
the
perfloop-pr-open-x4pwe00q16
branch
from
September 10, 2026 01:33
7331133 to
5101b74
Compare
perfloop
Bot
force-pushed
the
perfloop-pr-open-x4pwe00q16
branch
from
September 12, 2026 07:38
5101b74 to
9ff6caa
Compare
This was referenced Oct 21, 2026
Resolve the serveRangeFromBlockCache conflict with #265 by keeping both fast paths: the certified range-span branch runs first, the BlocksComplete optimistic branch second (disjoint entry classes). RFC read-path steps renumbered; test helpers from both sides kept. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Take main's RecordRequestResult call while keeping the partial-range hit counter, and make the benchmark writer's checksum order-sensitive (CRC32) so a reordered block cannot validate. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NGTev5ePU5jHubGtdoUfK6
ovaistariq
approved these changes
Oct 21, 2026
|
🎉 This PR is included in version 1.22.3 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Warm block-cached ranges with
BlocksCompletemetadata now skip the serial per-block presence probes. For a multi-block single range, the proxy stages and validates the exact first requested slice before sending206, then streams the remaining blocks through the existing ordered recovery and salvage path. Complete full-object serves keep the same optimistic one-read-per-block path.Incomplete metadata and staging-budget declines retain the conservative probe-first path. First-slice eviction or recovery failure falls through before headers are committed; mid-stream eviction remains bounded and ETag changes cannot mix versions. The staged buffer uses the exact slice size, and the full client range is still passed to footer prefetch when the stream is split.
The reapplication is aligned with current main's source-local request metrics and block-populate contract. It adds handler-path coverage for warm 2–32-block ranges with a delayed remote cache owner, integration coverage for first-slice fallback, mid-stream recovery, version mismatch, and staging decline, and updates RFC 0001 with the range path and its boundaries.
Tests:
make lint-ci,make build,make test,make test-integration,make test-race, andmake test-coverage.Workload:
BlocksComplete warm 2-block rangefirst-206-ns/opcache-calls/opWorkload:
BlocksComplete warm 4-block rangefirst-206-ns/opcache-calls/opWorkload:
BlocksComplete warm 8-block rangefirst-206-ns/opcache-calls/opWorkload:
BlocksComplete warm 16-block rangefirst-206-ns/opcache-calls/opWorkload:
BlocksComplete warm 32-block rangefirst-206-ns/opcache-calls/opGenerated by Perfloop. Measurements and checks.
Note
Medium Risk
Changes the block-cache range hot path for committed 206 responses (pre-commit staging, mid-stream recovery, and version handling), though behavior is heavily regression-tested and falls back to the prior probe-first path when hints or budget decline.
Overview
Warm multi-block range serves on block-cache entries with
BlocksCompletenow use the same probe-free pattern as complete full-object GETs: one payload read per covering block instead of a serialBlockExistspass plus reads.For ranges longer than one block (and outside a range-created span certificate),
serveRangeFromBlockCachereserves staging for the first requested slice, validates or recovers it before committing206, then streams the rest throughstreamBlockRangeWithFooterRangeso Parquet footer prefetch still sees the full client range.serveCompleteFromBlocksis generalized with an optional range (rng == nilfor full GET). Incomplete metadata or a staging-budget decline still use the conservative probe-first path.Adds a handler benchmark for warm
BlocksCompleteranges (2–32 blocks) over a delayed remote cache owner, integration tests for read counts, first-slice fallback/salvage, ETag mismatch, and staging decline, and updates RFC 0001 with the new read-path step.Reviewed by Cursor Bugbot for commit f0c2dd2. Bugbot is set up for automated code reviews on this repo. Configure here.