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.
master
Harshavardhana 7 years ago committed by kannappanr
parent 4ca10479b5
commit 994fe53669
  1. 4
      cmd/xl-v1-healing.go

@ -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…
Cancel
Save