Handle BucketAlreadyExists races and bump arsenal for MPU afterEach fix#6222
Handle BucketAlreadyExists races and bump arsenal for MPU afterEach fix#6222benzekrimaha wants to merge 4 commits into
Conversation
Hello benzekrimaha,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 |
ab63d85 to
2cae9bc
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 |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
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_pull_requests, create_integration_branches |
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 2 files with indirect coverage changes @@ Coverage Diff @@
## development/9.3 #6222 +/- ##
===================================================
+ Coverage 84.93% 84.98% +0.04%
===================================================
Files 206 206
Lines 13366 13372 +6
===================================================
+ Hits 11353 11364 +11
+ Misses 2013 2008 -5
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
2cae9bc to
6178ad8
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 |
There was a problem hiding this comment.
I think the pr is fine but some changes are complicated to understand (#6222 (comment)), also the linter with some commits not squashed yet is very hard to read
Treat a concurrent creator as the owner of normal bucket cleanup and return the local minimal MPU bucket without another metadata read. Issue: CLDSRV-919
a5ee5bb to
63926ab
Compare
|
@maeldonn , please review in my place as I'm going on PTO! Thanks |
Concurrent MongoDB createBucket calls behaved as silent idempotent writes, so a request losing the race could overwrite the winner's bucket metadata. - This commit uses $setOnInsert in the metastore upsert so duplicate requests never overwrite existing bucket metadata, and returns BucketAlreadyExists when the upsert matches an existing entry, aligning with the other backends. - Treats BucketAlreadyExists as success when initializing usersBucket. - Treats NamespaceExists as success after a new metastore insert (an orphaned backing collection is not a bucket-level duplicate) and keeps sharding it; treats AlreadyInitialized as success. - Invokes the callback outside Promise rejection handling and returns the chain, so a callback exception can no longer trigger a second callback. Must be deployed with scality/cloudserver#6222, which handles the new error in the normal and MPU shadow-bucket creation paths. Issue: ARSN-613
…cates Concurrent MongoDB createBucket calls behaved as silent idempotent writes, so a request losing the race could overwrite the winner's bucket metadata. - Use $setOnInsert in the metastore upsert so duplicate requests never overwrite existing bucket metadata, and return BucketAlreadyExists when the upsert matches an existing entry, aligning with the other backends. - Treat BucketAlreadyExists as success when initializing usersBucket. - Treat NamespaceExists as success after a new metastore insert (an orphaned backing collection is not a bucket-level duplicate) and keep sharding it; treat AlreadyInitialized as success. - Invoke the callback outside Promise rejection handling and return the chain, so a callback exception can no longer trigger a second callback. Must be deployed with scality/cloudserver#6222, which handles the new error in the normal and MPU shadow-bucket creation paths. Issue: ARSN-613
123ad9b to
d25b259
Compare
Keep the Prettier migration isolated from the functional race fix so reviewers can inspect the behavior independently. Issue: CLDSRV-919
d25b259 to
a7978ae
Compare
|
/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 |
|
/create_pull_requests |
Integration data createdI have created the integration data for the additional destination branches.
The following branches will NOT be impacted:
Follow integration pull requests if you would like to be notified of The following options are set: create_pull_requests, create_integration_branches |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
The following options are set: create_pull_requests, create_integration_branches |
ConflictThere is a conflict between your branch Please resolve the conflict on the feature branch ( git fetch && \
git checkout origin/improvement/CLDSRV-919-afterEach-flakiness-internal-error-fix && \
git merge origin/development/9.3Resolve merge conflicts and commit git push origin HEAD:improvement/CLDSRV-919-afterEach-flakiness-internal-error-fixThe following options are set: create_pull_requests, create_integration_branches |
Context
ARSN-613 changes MongoDB
createBucket()to returnBucketAlreadyExistswhen another request wins a concurrent metastore upsert.Cloudserver must handle this explicit result instead of surfacing an
InternalError.This fixes an intermittent MPU test-cleanup failure where concurrent
ListMultipartUploadscalls race while creating the hidden MPU shadow bucket.Paired Arsenal change:
Arsenal #2672.
Arsenal dependency
Cloudserver is temporarily pinned to Arsenal commit:
506014399741d3fd011c25288fc38c985337babeBefore release, this SHA will be replaced with the Arsenal release tag containing
ARSN-613.
Issue: CLDSRV-919