Repository navigation
perf(proxy): skip range presence probes on certified hits - #265
Merged
Merged
Conversation
Signed-off-by: Perfloop Agent <[email protected]>
Signed-off-by: Perfloop Agent <[email protected]>
[Medium impact] The PR appears safe to merge; no actionable defects were found. SummaryAdds a bounded
No actionable issues were found. Review checks were static; tests and benchmarks were not run. Reviews (1) · Last reviewed commit: "perf(proxy): skip presence probes for ce..." · Reviewed by Greptile |
efirs
approved these changes
Oct 18, 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.
Range-created block-mode metadata now stores its initial contiguous block span only after every touched block is durable. A later multi-block Range wholly inside that span can skip the serial presence preflight on a complete hit.
The bounded, write-once hint is scoped to the metadata row's ETag and block size; blocks can evict independently. Legacy and metadata-only-on-write entries, out-of-span ranges and staging-budget declines keep their probe-first path. Certified requests stage the full range before headers so a missing or transient block can still take the existing pre-commit fallback.
The native handler benchmark sends a 4-MiB partial Range for a 5-MiB object with 1-MiB blocks. It signs the request before timing and validates each request through TAG's transparent SigV4 validator. The cold 206 comes from an in-process origin fixture; the benchmark does not contact a production S3 endpoint or real cluster. The delayed-remote case stores metadata in embedded RocksDB and serves blocks from a loopback gRPC in-memory owner with a fixed 2-ms delay per Get; the local control uses embedded RocksDB for both. The benchmark also includes 2-, 8-, and 32-block diagnostic rows; the official comparison below uses the four-block case. The Go benchmark ships, but its comparison adapter does not. Time-to-206 ends when response headers arrive. Its process CPU diagnostic includes the client, handler and in-process cache work, not production CPU.
warm 4-MiB partial S3 Range hit through handler with valid SigV4; 5-MiB object, 1-MiB blocks, delayed loopback gRPC block owner(9 paired runs):ns/op19.73 ms → 8.809 ms (paired change -54.9%).warm 4-MiB partial S3 Range hit through handler with valid SigV4; 5-MiB object, 1-MiB blocks, embedded RocksDB local owner(48 paired runs): declared guards passed.The handler and proxy tests check exact same-span and contained-span bytes, zero presence probes and no warm origin calls. They also cover replacement and tombstones, first/middle eviction, transient failures, staging-budget decline and cancellation. The unit, build and lint checks passed, as did the focused block-cache integration and race checks.
Production request frequency, real peer latency and topology, and aggregate savings remain unmeasured.
Generated by Perfloop.
Note
Medium Risk
Changes block-mode Range serving and metadata publication; incorrect fast-path behavior could affect partial-content correctness, though pre-commit staging and existing fallbacks limit exposure.
Overview
Adds a write-once
RangeBlockSpanhint to block-mode cache metadata: after a Range miss populates contiguous blocks, metadata records that inclusive block span (scoped to ETag andBlockSize) only once the blocks are durable.Warm multi-block Range requests wholly inside that span can take a new certified fast path that stages every payload slice concurrently before committing
206, skipping the serial byte-zero presence preflight on a complete hit. Evictions, partial misses, staging-budget declines, and out-of-span ranges still use the existing probe/fetch/stream paths; first-slice transients or a 5s speculative-read cap fall back to upstream while the client context is live.populateBlockModeis extracted so span publication and invalidation fencing stay testable; docs, RFC 0001, benchmarks, and broad integration/handler tests cover correctness and the measured warm-range latency win.Reviewed by Cursor Bugbot for commit 3981e34. Bugbot is set up for automated code reviews on this repo. Configure here.