diff --git a/cmd/background-newdisks-heal-ops.go b/cmd/background-newdisks-heal-ops.go index d8d1acb55..ac5662556 100644 --- a/cmd/background-newdisks-heal-ops.go +++ b/cmd/background-newdisks-heal-ops.go @@ -164,7 +164,7 @@ func monitorLocalDisksAndHeal(ctx context.Context, z *erasureZones, bgSeq *healS for _, disk := range disks { logger.Info("Healing disk '%s' on %s zone", disk, humanize.Ordinal(i+1)) - lbDisks := z.zones[i].sets[setIndex].getLoadBalancedNDisks(z.zones[i].listTolerancePerSet) + lbDisks := z.zones[i].sets[setIndex].getOnlineDisks() if err := healErasureSet(ctx, setIndex, buckets, lbDisks); err != nil { logger.LogIf(ctx, err) continue diff --git a/cmd/erasure-common.go b/cmd/erasure-common.go index 6c45fb11b..174bc2a1a 100644 --- a/cmd/erasure-common.go +++ b/cmd/erasure-common.go @@ -75,6 +75,9 @@ func (er erasureObjects) getOnlineDisks() (newDisks []StorageAPI) { func (er erasureObjects) getLoadBalancedNDisks(ndisks int) (newDisks []StorageAPI) { disks := er.getLoadBalancedDisks(ndisks != -1) for _, disk := range disks { + if disk == nil { + continue + } newDisks = append(newDisks, disk) ndisks-- if ndisks == 0 { diff --git a/cmd/erasure-sets.go b/cmd/erasure-sets.go index 73ab63074..ac33bc429 100644 --- a/cmd/erasure-sets.go +++ b/cmd/erasure-sets.go @@ -1026,6 +1026,7 @@ func (s *erasureSets) startMergeWalksVersionsN(ctx context.Context, bucket, pref wg.Add(1) go func(disk StorageAPI) { defer wg.Done() + entryCh, err := disk.WalkVersions(GlobalContext, bucket, prefix, marker, recursive, endWalkCh) if err != nil { return