Repository navigation
fix: skip cache warming for no-store CopyObject - #252
Merged
Merged
Conversation
Signed-off-by: Perfloop Agent <[email protected]>
Signed-off-by: Perfloop Agent <[email protected]>
|
ovaistariq
approved these changes
Oct 12, 2026
|
🎉 This PR is included in version 1.22.2 🎉 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.
The change
Successful
CopyObjectrequests withCache-Control: no-storeorprivatenow skip both post-copy cache warmers. The destination still follows the existing pre-forward invalidation path and is re-invalidated only after the confirmed-success check. The existing 2xx-with-<Error>classification is unchanged, so a failed copy does not discard a racing refill.This applies in non-tiered proxy mode when the cache is enabled and either
cache.warm_on_writeorcache.parquet_optimizationis enabled. Requests withoutno-storeorprivateretain existing warming; tiered mode, disabled caching, and configurations with both warming options off are unchanged.Tests
The proxy fixtures supply Authorization and use a 4 KiB Parquet destination with 1 KiB blocks. They cover
no-store, repeated mixed-caseCache-Controlfields, andprivate. Rejected-copy cases assert zero full-object GETs, trailer/range requests, cache-population writes, and active populate slots or workers while checking the 200 CopyObjectResult and both invalidations. A cacheable Parquet control still starts both warmers. Existing failed-copy and 200-<Error>tests verify that racing refills survive unsuccessful copies.Final assertion: satisfied.
Comparison assertion: violated.
Comparison commit:
dcc4d64b6579b28ebde02aa6b8f7df0ddabbb71d.process_cpu_ns/oppopulate_origin_B/opEach workload ran 10 paired runs.
The retained Go benchmark fixture is not part of this pull request. It measures one fixed 4 MiB no-store Parquet CopyObject through the public HTTP handler with 1 MiB blocks, a memory cache, and an in-process origin that returns a cacheable object. The client timer ends at the CopyObject response; it does not include detached population time. The process-CPU metric includes the whole benchmark process, including the handler and local origin, through population completion. The byte metric counts only population GET/range response-body bytes from the local origin; it is not a measurement of physical storage reads. This is not a production traffic replay or a TAG-only CPU measurement. Production request share, object-size distribution, aggregate CPU and origin transfer, end-to-end latency, and cache-capacity impact remain unmeasured; those require an authorized representative trace or production telemetry.
The required checks that exercise this change passed:
make lint-ci,make build,make test,make test-race,make test-coverage, andTEST=TestHandleCopyObject make test-proxy.Generated by Perfloop.
Note
Low Risk
Targeted change to post-success background warming on CopyObject; invalidation and copy success gating are unchanged, with new regression tests.
Overview
Successful CopyObject requests that carry
Cache-Control: no-storeorprivateno longer run post-copywarmOnWriteorwarmParquetFooterOnWrite, matching the PUT cache-admission path viahasNoCacheDirectives. Admission is decided before forwarding so failed copies still get pre/post invalidation without starting warmers.Destination invalidation (pre-forward and post-success converge) is unchanged; tiered mode, disabled cache, and copies without those directives behave as before.
Docs in README, cache-control, and parquet-optimization describe the CopyObject exception. New proxy tests cover
no-store, mixed-case repeated headers,private, invalidation-only behavior, and a control that still warms cacheable Parquet copies.Reviewed by Cursor Bugbot for commit 4dff32b. Bugbot is set up for automated code reviews on this repo. Configure here.