INTEGRATION [PR#2672 > development/8.5] ARSN-613: Properly return already exists error#2677
Merged
bert-e merged 3 commits intoJul 23, 2026
Conversation
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
…adyExistsError' into w/8.5/improvement/ARSN-613-return-alreadyExistsError
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development/8.5 #2677 +/- ##
================================================
Coverage 74.72% 74.73%
================================================
Files 229 229
Lines 18692 18695 +3
Branches 3862 3864 +2
================================================
+ Hits 13967 13971 +4
+ Misses 4720 4719 -1
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
This pull request has been created automatically.
It is linked to its parent pull request #2672.
Do not edit this pull request directly.
If you need to amend/cancel the changeset on branch
w/8.5/improvement/ARSN-613-return-alreadyExistsError, please follow thisprocedure:
git fetch git checkout w/8.5/improvement/ARSN-613-return-alreadyExistsError # <amend or cancel the changeset by _adding_ new commits> git push origin w/8.5/improvement/ARSN-613-return-alreadyExistsErrorPlease always comment pull request #2672 instead of this one.