Repository navigation
perf: skip header clones for stream-only PUTs - #175
Merged
Merged
Conversation
Greptile SummarySplits response streaming from optional metadata capture so ordinary PUT forwarding avoids cloning upstream headers while the write-through tee retains independent ETag metadata.
Confidence Score: 5/5The PR appears safe to merge because stream-only callers discard metadata and the sole metadata-dependent write-through path continues to receive cloned headers. The optimization changes only the discarded metadata return for ordinary forwarding, while preserving response streaming and independently owned headers for the ETag-consuming tee path. Important Files Changed
Reviews (1): Last reviewed commit: "perf: skip header clones for stream-only..." | Re-trigger Greptile |
|
🎉 This PR is included in version 1.18.0 🎉 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.
Split response streaming from metadata capture so normal PUT forwarding skips cloning upstream headers it does not retain. Add a concurrent transparent PUT benchmark through the public handler route.
Keep the header clone in the write-through tee path, where its independently owned ETag is needed after streaming.
Testing
make lint-cimake test-proxygo test ./handlersWorkload:
concurrent authenticated transparent PutObject with the default enabled-cache configurationstream_header_clone_alloc_space_bytes/opstream_header_clone_alloc_objects/opGenerated by Perfloop. Measurements and checks.
Note
Low Risk
Internal forwarding allocation change with tests covering header ownership; no auth or request-path behavior change.
Overview
Stops cloning upstream response headers on the common stream-only PUT path.
executeAndStreamnow streams without retaining a header copy;executeAndStreamReturningMetastill clones so the write-through tee can keep an independent ETag after the body is consumed.Adds a unit test that the captured headers are owned (not aliased to the upstream map) and a concurrent transparent PutObject benchmark through the public handler route.
Reviewed by Cursor Bugbot for commit bf229fc. Bugbot is set up for automated code reviews on this repo. Configure here.