Skip to content

fix: preserve destination metadata for gateway uploads - #7532

Open
Mulily0513 wants to merge 1 commit into
juicedata:mainfrom
Mulily0513:codex/gateway-inherited-metadata
Open

Mulily0513 wants to merge 1 commit into
juicedata:mainfrom
Mulily0513:codex/gateway-inherited-metadata

Conversation

@Mulily0513

@Mulily0513 Mulily0513 commented Sep 10, 2026

Copy link
Copy Markdown

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

  • 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

Test plan

  • go test ./pkg/meta -run '^TestMemKVClient$' -count=1
  • go test ./pkg/meta -run '^TestSQLiteClient$' -count=1
  • go test ./pkg/gateway -count=1
  • go test ./pkg/meta -run '^$'
  • git diff --check

@CLAassistant

CLAassistant commented Sep 10, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@Mulily0513
Mulily0513 force-pushed the codex/gateway-inherited-metadata branch from d8bd583 to 9d8d90d Compare September 10, 2026 17:46
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
Mulily0513 force-pushed the codex/gateway-inherited-metadata branch from 9d8d90d to 39f255c Compare September 10, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gateway file creation does not inherit the destination directory's POSIX ACL and GID

2 participants