mirror of
https://github.com/minio/minio
synced 2024-09-06 08:44:03 +00:00
erasure: listOnlineDisks should return errFileNotFound for errReadQuorum. (#1573)
Fixes #1571
This commit is contained in:
parent
0db3218d5d
commit
5f0ca64346
|
@ -63,12 +63,13 @@ func (xl XL) listOnlineDisks(volume, path string) (onlineDisks []StorageAPI, mda
|
|||
for _, err := range errs {
|
||||
if err == errFileNotFound {
|
||||
notFoundCount++
|
||||
// If we have errors with file not found equal to the number of disks.
|
||||
if notFoundCount > len(xl.storageDisks)-xl.readQuorum {
|
||||
return nil, xlMetaV1{}, false, errFileNotFound
|
||||
}
|
||||
}
|
||||
}
|
||||
// If we have errors with file not found equal to the number of disks.
|
||||
if notFoundCount == len(xl.storageDisks) {
|
||||
return nil, xlMetaV1{}, false, errFileNotFound
|
||||
}
|
||||
|
||||
highestVersion := int64(0)
|
||||
onlineDisks = make([]StorageAPI, len(xl.storageDisks))
|
||||
// List all the file versions from partsMetadata list.
|
||||
|
|
|
@ -191,11 +191,14 @@ func getMultipartObjectInfo(storage StorageAPI, bucket, object string) (info Mul
|
|||
offset := int64(0)
|
||||
r, err := storage.ReadFile(bucket, pathJoin(object, multipartMetaFile), offset)
|
||||
if err != nil {
|
||||
return
|
||||
return MultipartObjectInfo{}, err
|
||||
}
|
||||
decoder := json.NewDecoder(r)
|
||||
err = decoder.Decode(&info)
|
||||
return
|
||||
if err != nil {
|
||||
return MultipartObjectInfo{}, err
|
||||
}
|
||||
return info, nil
|
||||
}
|
||||
|
||||
// GetObjectInfo - get object info.
|
||||
|
|
Loading…
Reference in a new issue