mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
Fix nil disks in getOnlineDisksWithHealing (#11419)
If a disk is skipped when nil it is still returned.
This commit is contained in:
parent
f2d49ec21a
commit
a71e0483c9
@ -238,6 +238,7 @@ func (er erasureObjects) getOnlineDisksWithHealing() (newDisks []StorageAPI, hea
|
||||
disk := disks[i-1]
|
||||
|
||||
if disk == nil {
|
||||
infos[i-1].Error = "nil disk"
|
||||
return
|
||||
}
|
||||
|
||||
@ -248,6 +249,7 @@ func (er erasureObjects) getOnlineDisksWithHealing() (newDisks []StorageAPI, hea
|
||||
//
|
||||
//
|
||||
// - Future: skip busy disks
|
||||
infos[i-1].Error = err.Error()
|
||||
return
|
||||
}
|
||||
|
||||
@ -260,7 +262,7 @@ func (er erasureObjects) getOnlineDisksWithHealing() (newDisks []StorageAPI, hea
|
||||
// Check if one of the drives in the set is being healed.
|
||||
// this information is used by crawler to skip healing
|
||||
// this erasure set while it calculates the usage.
|
||||
if info.Healing {
|
||||
if info.Healing || info.Error != "" {
|
||||
healing = true
|
||||
continue
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user