From d0283ff354fb15554ec558b9f61bbd1bfa372fad Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Fri, 26 Jan 2024 08:39:57 -0800 Subject: [PATCH] remove unnecessary logs in HealBucket() (#18875) --- cmd/peer-s3-server.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/cmd/peer-s3-server.go b/cmd/peer-s3-server.go index 9f3a210c5..0302c615d 100644 --- a/cmd/peer-s3-server.go +++ b/cmd/peer-s3-server.go @@ -21,7 +21,6 @@ import ( "context" "encoding/gob" "errors" - "fmt" "net/http" "github.com/minio/madmin-go/v3" @@ -164,11 +163,7 @@ func healBucketLocal(ctx context.Context, bucket string, opts madmin.HealOpts) ( if localDrives[index] == nil { return errDiskNotFound } - err := localDrives[index].DeleteVol(ctx, bucket, false) - if !errors.Is(err, errVolumeNotEmpty) { - logger.LogOnceIf(ctx, fmt.Errorf("While deleting dangling Bucket (%s), Drive %s:%s returned an error (%w)", - bucket, localDrives[index].Hostname(), localDrives[index], err), "delete-dangling-bucket-"+bucket) - } + localDrives[index].DeleteVol(ctx, bucket, false) return nil }, index) } @@ -186,11 +181,11 @@ func healBucketLocal(ctx context.Context, bucket string, opts madmin.HealOpts) ( index := index g.Go(func() error { if beforeState[index] == madmin.DriveStateMissing { - makeErr := localDrives[index].MakeVol(ctx, bucket) - if makeErr == nil { + err := localDrives[index].MakeVol(ctx, bucket) + if err == nil { afterState[index] = madmin.DriveStateOk } - return makeErr + return err } return errs[index] }, index)