fix: preserve destination metadata for gateway uploads - #7532
Open
Mulily0513 wants to merge 1 commit into
Open
Mulily0513 wants to merge 1 commit into
Mulily0513 wants to merge 1 commit into
Conversation
Mulily0513
force-pushed
the
codex/gateway-inherited-metadata
branch
from
September 10, 2026 17:46
d8bd583 to
9d8d90d
Compare
Apply the destination directory's GID and default ACL when committing staged gateway files through rename, while keeping ordinary POSIX rename behavior unchanged. Add regression coverage for: - GID and default ACL inheritance for staged files - Missing and minimal default ACL behavior - Ordinary rename metadata compatibility - Overwrite and RenameNoReplace rollback paths - Deterministic concurrent metadata update conflicts - Group quota updates when the file GID changes - Unchanged group quota usage for ordinary rename - Nested parent-directory creation for Gateway PUT, COPY, and multipart completion
Mulily0513
force-pushed
the
codex/gateway-inherited-metadata
branch
from
September 10, 2026 18:24
9d8d90d to
39f255c
Compare
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.
Summary
Fixes #7523
Gateway uploads are first written to staging files before they are committed to their destination path. This change applies the destination directory's GID and default ACL when committing staged regular files, while keeping ordinary POSIX rename behavior unchanged.
The implementation also handles nested destination paths for Gateway PUT, COPY, and multipart completion.
Regression coverage
Test plan
go test ./pkg/meta -run '^TestMemKVClient$' -count=1go test ./pkg/meta -run '^TestSQLiteClient$' -count=1go test ./pkg/gateway -count=1go test ./pkg/meta -run '^$'git diff --check