Skip to content

Commit

Permalink
Ignore bucket not found in getBucketInfos()
Browse files Browse the repository at this point in the history
This may happen due to race condition (on bucket removal), or if the
system is interrupted halfway in bucket creation/removal.

Issue: ARSN-447
  • Loading branch information
francoisferrand committed Nov 26, 2024
1 parent 5612a8d commit 84f002f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/storage/metadata/mongoclient/MongoClientInterface.js
Original file line number Diff line number Diff line change
Expand Up @@ -2136,6 +2136,10 @@ class MongoClientInterface {
// in $regex
return this.getBucketAttributes(bucketName, log,
(err, bucketInfo) => {
if (err?.is?.NoSuchBucket) {
// Skip bucket if not found: can happen if bucket has just been removed
return next();
}
if (err) {
log.error('failed to get bucket attributes', {
bucketName,
Expand Down

0 comments on commit 84f002f

Please sign in to comment.