Repository navigation
fix(replication): avoid persisting aws-chunked metadata - #187
chodorenko wants to merge 1 commit into
Conversation
Signed-off-by: Mikhail Khadarenka <[email protected]>
Restore only the six replication-specific metadata fields after trust validation, so streaming uploads retain their actual content encoding and Snowball entries do not inherit ordinary metadata from the outer archive. Include helper, authenticated PUT/COPY/multipart and Snowball regressions, plus the R7 investigation, actual Opus 5 consensus and local verification. The production change is based on PR pgsty#187 by Mikhail Khadarenka. Co-authored-by: Mikhail Khadarenka <[email protected]> Signed-off-by: Feng Ruohang <[email protected]>
|
Thank you for the fix. Your implementation was incorporated in PR #194, merged as The fix preserves metadata normalization when restoring replication-specific fields, preventing Documentation: Replica metadata fix and release status. As of September 16, the fix is on |
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