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