S3UTILS-226 MPU orphan cleanup script#380
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development/1.16 #380 +/- ##
====================================================
+ Coverage 44.59% 45.23% +0.64%
====================================================
Files 84 85 +1
Lines 5819 6046 +227
Branches 1237 1282 +45
====================================================
+ Hits 2595 2735 +140
- Misses 3179 3265 +86
- Partials 45 46 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
8ab54e6 to
07cb65f
Compare
3386bfa to
e3f5b12
Compare
Hello jonathan-gramain,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 |
|
ping |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
0458ae8 to
bb4d32c
Compare
scality-fno
left a comment
There was a problem hiding this comment.
Strictly from a doc perspective.
I'm ok with the documentation. Some clarification could be beneficial. Not a blocker, though.
| log.info('starting discovery phase: scanning MPU shadow bucket', { bucket, shadowBucket }); | ||
|
|
||
| status.bucket = bucket; | ||
| status.phase = 'discovery'; | ||
| status.orphanedUploadIds = 0; | ||
| status.versionsScanned = 0; | ||
| status.orphanPartsDeleted = 0; | ||
| status.sproxydKeysDeleted = 0; | ||
|
|
||
| const orphanMap = await buildOrphanMap( | ||
| BUCKETD_HOSTPORT, | ||
| shadowBucket, | ||
| { pageSize: LISTING_PAGE_SIZE, retry: RETRY_PARAMS }, | ||
| ); | ||
| const orphanCount = Object.keys(orphanMap).length; | ||
| status.orphanedUploadIds = orphanCount; | ||
| logProgress('discovery phase complete'); | ||
| if (orphanCount === 0) { | ||
| return; | ||
| } | ||
|
|
||
| for (const [uploadId, info] of Object.entries(orphanMap)) { | ||
| log.info('orphaned MPU found', { |
There was a problem hiding this comment.
Don't know if the Usage section is meant to describe the exact sequence of the log messages, but if it is, the code contradicts it: the "orphaned MPU found" message comes last. Is this intentional?
There was a problem hiding this comment.
I put the messages in roughly the order in which they should come indeed. I think "orphaned MPU found" is correctly placed since it occurs during the first discovery phase, before the cleanup phase.
Implement cleanupMpuOrphans.js to delete orphaned parts and sproxyd keys. Orphaned parts are part metadata which do not correspond to an overview key with the same upload ID. Sproxyd keys are only removed if no completed MPU object has a matching upload ID in the same bucket.
747bcf5 to
4af1de4
Compare
|
/approve |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the The following options are set: approve |
|
ping |
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: 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 S3UTILS-226. Goodbye jonathan-gramain. The following options are set: approve |
Implement cleanupMpuOrphans.js to delete orphaned parts and sproxyd keys.
Orphaned parts are part metadata which do not correspond to an overview key with the same upload ID.
Sproxyd keys are only removed if no completed MPU object has a matching upload ID in the same bucket.