mirror of https://github.com/minio/minio.git
Avoid shadowing ignored errors listAllBuckets() (#5524)
It can happen such that one of the disks that was down would return 'errDiskNotFound' but the err is preserved due to loop shadowing which leads to issues when healing the bucket.
This commit is contained in:
parent
4ca10479b5
commit
994fe53669
|
@ -300,7 +300,7 @@ func listAllBuckets(storageDisks []StorageAPI) (buckets map[string]VolInfo,
|
|||
if errors.IsErrIgnored(err, bucketMetadataOpIgnoredErrs...) {
|
||||
continue
|
||||
}
|
||||
break
|
||||
return nil, nil, err
|
||||
}
|
||||
for _, volInfo := range volsInfo {
|
||||
// StorageAPI can send volume names which are
|
||||
|
@ -316,7 +316,7 @@ func listAllBuckets(storageDisks []StorageAPI) (buckets map[string]VolInfo,
|
|||
buckets[volInfo.Name] = volInfo
|
||||
}
|
||||
}
|
||||
return buckets, bucketsOcc, err
|
||||
return buckets, bucketsOcc, nil
|
||||
}
|
||||
|
||||
// ListBucketsHeal - Find all buckets that need to be healed
|
||||
|
|
Loading…
Reference in New Issue