mirror of
https://github.com/minio/minio.git
synced 2025-01-23 12:43:16 -05:00
remove unnecessary logs in HealBucket() (#18875)
This commit is contained in:
parent
f449a7ae2c
commit
d0283ff354
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user