-
Notifications
You must be signed in to change notification settings - Fork 249
AbortMPU cleanup - revisited #5854
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
Hello williamlardier,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
5cf7573
to
a814106
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 2 files with indirect coverage changes @@ Coverage Diff @@
## development/8.8 #5854 +/- ##
===================================================
+ Coverage 65.27% 65.44% +0.16%
===================================================
Files 188 188
Lines 12024 12064 +40
===================================================
+ Hits 7849 7895 +46
+ Misses 4175 4169 -6
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
const listParams = { | ||
listingType: 'DelimiterVersions', | ||
// To only list the specific key, we need to add the versionId separator | ||
prefix: `${objectKey}${versioning.VersioningConstants.VersionId.Separator}`, |
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.
Will need further tests to ensure this works file - we do not officially have a way to list all versions of just one object
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.
Test done, it's working well. Example:
{
"CommonPrefixes": [],
"Versions": [
{
"key": "bug-test-bda30555",
"value": {
"Size": 1048576,
"ETag": "3eaf2c9512f76a55da265ad51ac21393-1",
"VersionId": "98248542529027999999RG00001",
"IsDeleteMarker": false,
"LastModified": "2025-07-02T11:57:50.972Z",
"Owner": {
"DisplayName": "acc",
"ID": "5874c85ff66d0ede3bd6e8fe9610f0640d1700a4607f8b7e414503fbd2cb03de"
},
"StorageClass": "STANDARD"
}
},
{
"key": "bug-test-bda30555",
"value": {
"Size": 1048576,
"ETag": "3eaf2c9512f76a55da265ad51ac21393-1",
"VersionId": "98248542540139999999RG00001",
"IsDeleteMarker": false,
"LastModified": "2025-07-02T11:57:39.857Z",
"Owner": {
"DisplayName": "acc",
"ID": "5874c85ff66d0ede3bd6e8fe9610f0640d1700a4607f8b7e414503fbd2cb03de"
},
"StorageClass": "STANDARD"
}
}
],
"IsTruncated": false
}
(while the same key with suffix exists)
a71a04f
to
f70c06a
Compare
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
9880217
to
a243976
Compare
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
let foundVersion = null; | ||
let shouldContinue = true; | ||
|
||
return async.whilst( |
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.
this function is already quite big, would make code more readable to introduce a helper function like findVersionWithUploadId()
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.
I moved it to services.js
, added tests for it, and refactored as a result the existing ones.
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
- CompleteMPU was and is still, at the time of this commit, wrongly promoting s3 objects when completing a MPU even if the parts are not valid. - The AbortMPU cleanup logic was added as an effort to cleanup new occurences of this problem, and still handle old ones not yet aborted. - The logic currently is unable to clean up if the current master version has a different upload id: in case a new version was pushed, we end up never cleaning the ghost. - This commit introduces a dynamic listing of the versionIDs of the object. We use the delimiter versions algorithm and the versionID separator to list only the current object versions, with pagination support, and then we detect the one to cleanup. Issue: CLDSRV-669
- CompleteMPU was and is still, at the time of this commit, wrongly promoting s3 objects when completing a MPU even if the parts are not valid. - The AbortMPU cleanup logic was added as an effort to cleanup new occurences of this problem, and still handle old ones not yet aborted. - The logic currently is unable to clean up if the current master version has a different upload id: in case a new version was pushed, we end up never cleaning the ghost. - This commit introduces a dynamic listing of the versionIDs of the object. We use the delimiter versions algorithm and the versionID separator to list only the current object versions, with pagination support, and then we detect the one to cleanup. Issue: CLDSRV-669
- Also, some test implementation was improved to reduce duplication. Issue: CLDSRV-669
9373b6c
to
ba31070
Compare
Request integration branchesWaiting for integration branch creation to be requested by the user. To request integration branches, please comment on this pull request with the following command:
Alternatively, the |
ba31070
to
e81db96
Compare
/create_integration_branches |
Integration data createdI have created the integration data for the additional destination branches.
The following branches will NOT be impacted:
You can set option
The following options are set: create_integration_branches |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
The following options are set: create_integration_branches |
/approve |
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue CLDSRV-669. Goodbye williamlardier. The following options are set: approve, create_integration_branches |
Relates to https://scality.atlassian.net/wiki/spaces/OS/pages/3258220958/Retriable+CompleteMultipartUpload
See ticket & commits for context
Issue: CLDSRV-669
Following this PR, we will fix the behavior of the CompleteMPU API to avoid promoting wrongly s3 objects if not all parts are valid. This might not be feasible because we want to be unified with S3C, that is not 100% standard with MPU management, as we can abort after a complete officially.