-
Notifications
You must be signed in to change notification settings - Fork 6k
fix: after AbortMultipartUpload can do PutObjectPart success that sta… #21229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…rted before AbortMultipartUpload fix: after AbortMultipartUpload can do PutObjectPart success that started before AbortMultipartUpload
There was a problem hiding this 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 fixes issue #21189 by ensuring that after an AbortMultipartUpload, a PutObjectPart operation that was initiated before the abort does not report a success.
- Update RenamePart in cmd/xl-storage.go to compute the destination directory using pathutil.Dir() twice and map errFileNotFound to errUploadIDNotFound.
- Add explicit error handling for errUploadIDNotFound in PutObjectPart in cmd/erasure-multipart.go.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
cmd/xl-storage.go | Modified renameAll call to compute destination dir and improved error mapping. |
cmd/erasure-multipart.go | Added error check for errUploadIDNotFound to handle missing upload IDs. |
Comments suppressed due to low confidence (1)
cmd/xl-storage.go:2967
- [nitpick] Consider assigning pathutil.Dir(pathutil.Dir(dstFilePath)) to a well-named variable (e.g., targetDir) to clarify its purpose and enhance readability.
if err = renameAll(srcFilePath, dstFilePath, pathutil.Dir(pathutil.Dir(dstFilePath))); err != nil {
…ctPart-success-that-started-before-AbortMultipartUpload-
update params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR looks good can you add the test into miniohq/eos integration tests and this PR to miniohq/eos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have change the rpc name into handler.RenamePart2 to ensure that the new argument is honored.
Basically disallows calls to go through during an upgrade. |
…ctPart-success-that-started-before-AbortMultipartUpload-
…s-that-started-before-AbortMultipartUpload-' of ssh://github.com/jiuker/minio into fix-after-AbortMultipartUpload-can-PutObjectPart-success-that-started-before-AbortMultipartUpload-
…rted before AbortMultipartUpload
fix: after AbortMultipartUpload can do PutObjectPart success that started before AbortMultipartUpload
Community Contribution License
All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.
Description
fix #21189
Motivation and Context
after AbortMultipartUpload, still can get the abortUploadPart info.
How to test this PR?
go run test
Should run this at linux.
Types of changes
Checklist:
commit-id
orPR #
here)