Skip to content

refactor: migrate multipart orchestration to usecase#1915

Merged
overtrue merged 1 commit intorustfs:mainfrom
overtrue:codex/refactor-p3c-multipart-batch2
Feb 23, 2026
Merged

refactor: migrate multipart orchestration to usecase#1915
overtrue merged 1 commit intorustfs:mainfrom
overtrue:codex/refactor-p3c-multipart-batch2

Conversation

@overtrue
Copy link
Collaborator

Type of Change

  • New Feature
  • Bug Fix
  • Documentation
  • Performance Improvement
  • Test/CI
  • Refactor
  • Other:

Related Issues

Summary of Changes

  • Move multipart orchestration for CreateMultipartUpload, UploadPart, CompleteMultipartUpload, and AbortMultipartUpload from rustfs/src/storage/ecfs.rs into rustfs/src/app/multipart_usecase.rs.
  • Keep impl S3 for FS behavior as thin delegation by routing the four multipart handlers through DefaultMultipartUsecase::from_global().
  • Add/adjust multipart usecase unit tests to validate key guardrails (store uninitialized, invalid storage class, missing parts/body).

Checklist

  • I have read and followed the CONTRIBUTING.md guidelines
  • Passed make pre-commit
  • Added/updated necessary tests
  • Documentation updated (if needed)
  • CI/CD passed (if applicable)

Impact

  • Breaking change (compatibility)
  • Requires doc/config/deployment update
  • Other impact:
  • Internal refactor only; external S3 API behavior and handler signatures remain unchanged.

Additional Notes

  • Local verification:
  • make pre-commit
  • MAXFAIL=999 XDIST=0 DEPLOY_MODE=build ./scripts/s3-tests/run.sh
  • s3-tests result: 119 passed, 0 failed.

Thank you for your contribution! Please ensure your PR follows the community standards (CODE_OF_CONDUCT.md) and sign the CLA if this is your first contribution.

Copilot AI review requested due to automatic review settings February 23, 2026 04:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes the refactoring effort to migrate S3 API orchestration logic into dedicated usecase modules by moving multipart upload operations from rustfs/src/storage/ecfs.rs to rustfs/src/app/multipart_usecase.rs. The refactoring follows the established patterns from previous bucket and object usecase migrations, maintaining identical behavior while improving code organization and testability.

Changes:

  • Migrate CreateMultipartUpload, UploadPart, CompleteMultipartUpload, and AbortMultipartUpload orchestration logic to DefaultMultipartUsecase::execute_* methods
  • Convert ecfs.rs S3 trait implementations to thin delegation layer calling DefaultMultipartUsecase::from_global()
  • Add unit tests validating key error paths (uninitialized store, invalid storage class, missing parts/body)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
rustfs/src/storage/ecfs.rs Removes multipart orchestration logic, replaces with delegation to DefaultMultipartUsecase::from_global() for all four multipart operations; removes now-unused imports
rustfs/src/app/multipart_usecase.rs Adds four execute_* methods containing migrated orchestration logic; updates DefaultMultipartUsecase struct to support optional context pattern; adds unit tests for input validation

@overtrue overtrue merged commit 5b8cbaf into rustfs:main Feb 23, 2026
17 checks passed
@overtrue overtrue deleted the codex/refactor-p3c-multipart-batch2 branch February 23, 2026 05:11
houseme added a commit that referenced this pull request Feb 23, 2026
…etadata

* 'main' of github.com:rustfs/rustfs:
  refactor: migrate multipart orchestration to usecase (#1915)
  refactor(app): migrate bucket sub-operation flows (#1914)
  refactor(app): migrate create/delete/head bucket flows (#1913)
  refactor(app): migrate copy/delete/head object flows (#1911)
  refactor(app): route put/get/listv2 through usecases (#1910)
  refactor(app): add AppContext skeleton wiring (#1909)
  refactor(app): add application layer module entry (#1907)

# Conflicts:
#	crates/ecstore/src/disk/local.rs
#	rustfs/src/storage/ecfs.rs
#	rustfs/src/storage/mod.rs
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.

2 participants