Skip to content

feat(transfer): support truthful destination storage classes - #305

Merged
cxymds merged 1 commit into
mainfrom
cxymds/issue-1457-storage-class
Jul 23, 2026
Merged

feat(transfer): support truthful destination storage classes#305
cxymds merged 1 commit into
mainfrom
cxymds/issue-1457-storage-class

Conversation

@cxymds

@cxymds cxymds commented Jul 23, 2026

Copy link
Copy Markdown
Member

Closes rustfs/backlog#1457

Background

cp --storage-class and pipe --storage-class were parsed but rejected unconditionally. The S3 transfer model can now carry destination storage class, while RustFS beta.10 has meaningful single-request behavior only for STANDARD and REDUCED_REDUNDANCY.

Root cause

The S3 adapter did not map storage class onto PutObject or CopyObject, command paths still used legacy methods, and multipart paths could not truthfully guarantee persistence. InvalidStorageClass also fell through to a generic network error.

Solution

  • accept only STANDARD and REDUCED_REDUNDANCY as meaningful RustFS beta.10 policies
  • send storage class on advanced PutObject and CopyObject requests
  • wire cp single/planned upload and server-side copy paths plus pipe to advanced options
  • reject label-only classes, unknown values, unknown sizes, and multipart transfers before mutation
  • report selected class in human dry-run output without changing JSON contracts
  • map service InvalidStorageClass to a stable UnsupportedFeature error
  • preserve HEAD-observed storage class for copy results

Multipart persistence remains tracked by rustfs/backlog#1464; broader capability truthfulness remains tracked by rustfs/backlog#1465.

Validation

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • process-level mock S3 coverage for cp upload, remote copy, pipe, and dry-run
  • independent review completed with no actionable findings

@cxymds
cxymds merged commit e54a600 into main Jul 23, 2026
@cxymds
cxymds deleted the cxymds/issue-1457-storage-class branch July 23, 2026 07:49
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.

1 participant