Skip to content

fix: skip cache warming for no-store CopyObject - #252

Merged
ovaistariq merged 2 commits into
mainfrom
perfloop-pr-open-htswb7rgyk
Oct 12, 2026
Merged

ovaistariq merged 2 commits into
mainfrom
perfloop-pr-open-htswb7rgyk

Conversation

@perfloop

@perfloop perfloop Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

The change

Successful CopyObject requests with Cache-Control: no-store or private now 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_write or cache.parquet_optimization is enabled. Requests without no-store or private retain 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-case Cache-Control fields, and private. 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.

Workload Measure Metric Before median After median Paired change
no-store 4 MiB Parquet CopyObject through the public handler time process_cpu_ns/op 9.1 ms 0.65 ms -93.4%
no-store 4 MiB Parquet CopyObject through the public handler populate_origin_B/op 5242888 0 -100%

Each 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, and TEST=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-store or private no longer run post-copy warmOnWrite or warmParquetFooterOnWrite, matching the PUT cache-admission path via hasNoCacheDirectives. 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.

@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Successful CopyObject requests with Cache-Control: no-store or private now skip both post-copy warmers in non-tiered mode.

  • CopyObject skips both cache warmers for no-store and private requests.

Reviews (1) · Last reviewed commit: "fix: skip warming for no-store CopyObjec..." · Reviewed by Greptile

@ovaistariq
ovaistariq merged commit 628616f into main Oct 12, 2026
10 checks passed
@ovaistariq
ovaistariq deleted the perfloop-pr-open-htswb7rgyk branch October 12, 2026 22:39
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 12, 2026
@tigrisdata-argocd-bot

Copy link
Copy Markdown

🎉 This PR is included in version 1.22.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants