From cc1a84b62e97b91692977ebe6e060514ef9d6617 Mon Sep 17 00:00:00 2001 From: Nitish Tiwari Date: Wed, 20 Nov 2019 23:40:26 +0530 Subject: [PATCH] Fix heal result item output to properly count drives and sets (#8543) --- cmd/xl-zones.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/xl-zones.go b/cmd/xl-zones.go index d3059aae5..4de25b2ab 100644 --- a/cmd/xl-zones.go +++ b/cmd/xl-zones.go @@ -1211,10 +1211,10 @@ func (z *xlZones) HealFormat(ctx context.Context, dryRun bool) (madmin.HealResul logger.LogIf(ctx, err) continue } - r.DiskCount = result.DiskCount - r.SetCount = result.SetCount - r.Before.Drives = append(r.Before.Drives, r.Before.Drives...) - r.After.Drives = append(r.After.Drives, r.After.Drives...) + r.DiskCount += result.DiskCount + r.SetCount += result.SetCount + r.Before.Drives = append(r.Before.Drives, result.Before.Drives...) + r.After.Drives = append(r.After.Drives, result.After.Drives...) } return r, nil } @@ -1234,10 +1234,10 @@ func (z *xlZones) HealBucket(ctx context.Context, bucket string, dryRun, remove } return result, err } - r.DiskCount = result.DiskCount - r.SetCount = result.SetCount - r.Before.Drives = append(r.Before.Drives, r.Before.Drives...) - r.After.Drives = append(r.After.Drives, r.After.Drives...) + r.DiskCount += result.DiskCount + r.SetCount += result.SetCount + r.Before.Drives = append(r.Before.Drives, result.Before.Drives...) + r.After.Drives = append(r.After.Drives, result.After.Drives...) } return r, nil }