remove unnecessary logs in HealBucket() (#18875)

This commit is contained in:
Harshavardhana 2024-01-26 08:39:57 -08:00 committed by GitHub
parent f449a7ae2c
commit d0283ff354
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,7 +21,6 @@ import (
"context" "context"
"encoding/gob" "encoding/gob"
"errors" "errors"
"fmt"
"net/http" "net/http"
"github.com/minio/madmin-go/v3" "github.com/minio/madmin-go/v3"
@ -164,11 +163,7 @@ func healBucketLocal(ctx context.Context, bucket string, opts madmin.HealOpts) (
if localDrives[index] == nil { if localDrives[index] == nil {
return errDiskNotFound return errDiskNotFound
} }
err := localDrives[index].DeleteVol(ctx, bucket, false) 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)
}
return nil return nil
}, index) }, index)
} }
@ -186,11 +181,11 @@ func healBucketLocal(ctx context.Context, bucket string, opts madmin.HealOpts) (
index := index index := index
g.Go(func() error { g.Go(func() error {
if beforeState[index] == madmin.DriveStateMissing { if beforeState[index] == madmin.DriveStateMissing {
makeErr := localDrives[index].MakeVol(ctx, bucket) err := localDrives[index].MakeVol(ctx, bucket)
if makeErr == nil { if err == nil {
afterState[index] = madmin.DriveStateOk afterState[index] = madmin.DriveStateOk
} }
return makeErr return err
} }
return errs[index] return errs[index]
}, index) }, index)