fix(replication): avoid persisting aws-chunked metadata - #187
Open
chodorenko wants to merge 1 commit into
Open
chodorenko wants to merge 1 commit into
chodorenko wants to merge 1 commit into
Conversation
Signed-off-by: Mikhail Khadarenka <chodorenko@gmail.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Contribution Licensing (no CLA, inbound=outbound, DCO required)
This pull request contributes to PGSTY SILO (
pgsty/silo). Code contributionsare accepted under AGPL-3.0-or-later, the same license as the server.
This project does not use a CLA or require a separate Apache-2.0 license grant.
By submitting this pull request I represent that I have the right to contribute
the code changes under this repository's
GNU Affero General Public License v3.0 or later
and retain copyright in my original work. Existing copyright and license
notices remain intact; separately licensed material keeps its applicable terms.
Every commit must carry a DCO
Signed-off-bytrailer(
git commit -s) certifying theDeveloper Certificate of Origin — see
CONTRIBUTING.md.
Description
Avoid persisting the SigV4 streaming transport header
Content-Encoding: aws-chunkedas replica object metadata.The trusted-replication path restored all supported headers after the ordinary metadata parser had normalized them. That reintroduced the raw transport encoding, although the source object has no content encoding.
This change restores only replication-only headers after trust validation and leaves normalized ordinary metadata intact.
Motivation and Context
Replicated objects can advertise
Content-Encoding: aws-chunkedeven though their bytes were never content-encoded. S3 clients consuming GET/HEAD responses from the replica may try to decode those bytes incorrectly.How to test this PR?
The updated regression test supplies trusted replication headers plus
Content-Encoding: aws-chunked, and verifies that the stored metadata has nocontent-encodingwhile replication-only fields are preserved.Compatibility impact
No API or configuration changes. Newly replicated objects no longer retain the invalid transport encoding in metadata. Existing objects with this metadata are not modified.
Types of changes
Checklist:
git commit -s) per the DCOmake verifierspassesgo buildpasspgsty/silo.pgsty.com, if neededfix for #185