refactor: migrate multipart orchestration to usecase#1915
Merged
overtrue merged 1 commit intorustfs:mainfrom Feb 23, 2026
Merged
refactor: migrate multipart orchestration to usecase#1915overtrue merged 1 commit intorustfs:mainfrom
overtrue merged 1 commit intorustfs:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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, andAbortMultipartUploadorchestration logic toDefaultMultipartUsecase::execute_*methods - Convert
ecfs.rsS3 trait implementations to thin delegation layer callingDefaultMultipartUsecase::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 |
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
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.
Type of Change
Related Issues
Summary of Changes
CreateMultipartUpload,UploadPart,CompleteMultipartUpload, andAbortMultipartUploadfromrustfs/src/storage/ecfs.rsintorustfs/src/app/multipart_usecase.rs.impl S3 for FSbehavior as thin delegation by routing the four multipart handlers throughDefaultMultipartUsecase::from_global().Checklist
make pre-commitImpact
Additional Notes
make pre-commitMAXFAIL=999 XDIST=0 DEPLOY_MODE=build ./scripts/s3-tests/run.shThank 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.