Skip to content

INTEGRATION [PR#2672 > development/8.5] ARSN-613: Properly return already exists error#2677

Merged
bert-e merged 3 commits into
development/8.5from
w/8.5/improvement/ARSN-613-return-alreadyExistsError
Jul 23, 2026
Merged

INTEGRATION [PR#2672 > development/8.5] ARSN-613: Properly return already exists error#2677
bert-e merged 3 commits into
development/8.5from
w/8.5/improvement/ARSN-613-return-alreadyExistsError

Conversation

@bert-e

@bert-e bert-e commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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 this
procedure:

 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-alreadyExistsError

Please always comment pull request #2672 instead of this one.

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

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.66667% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.73%. Comparing base (8896924) to head (fd1354b).

Files with missing lines Patch % Lines
...orage/metadata/mongoclient/MongoClientInterface.ts 91.66% 3 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bert-e bert-e closed this Jul 23, 2026
@bert-e
bert-e merged commit fd1354b into development/8.5 Jul 23, 2026
14 checks passed
@bert-e
bert-e deleted the w/8.5/improvement/ARSN-613-return-alreadyExistsError branch July 23, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants