diff --git a/cmd/admin-handlers.go b/cmd/admin-handlers.go index e425ef492..0c0727fa0 100644 --- a/cmd/admin-handlers.go +++ b/cmd/admin-handlers.go @@ -753,23 +753,26 @@ func (a adminAPIHandlers) HealSetsHandler(w http.ResponseWriter, r *http.Request opts.setNumbers = append(opts.setNumbers, i-1) } - opts.sleepDuration = time.Second var err error + if v := vars[healSleepDuration]; v != "" { opts.sleepDuration, err = time.ParseDuration(v) if err != nil { writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL) return } + } else { + opts.sleepDuration = 100 * time.Millisecond } - opts.sleepForIO = 10 if v := vars[healSleepMaxIO]; v != "" { opts.sleepForIO, err = strconv.Atoi(v) if err != nil { writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL) return } + } else { + opts.sleepForIO = 1000 } buckets, _ := objectAPI.ListBucketsHeal(ctx) @@ -782,7 +785,9 @@ func (a adminAPIHandlers) HealSetsHandler(w http.ResponseWriter, r *http.Request defer wg.Done() lbDisks := z.serverSets[0].sets[setNumber].getDisks() if err := healErasureSet(ctx, vars[healSetsPrefix], setNumber, opts.sleepForIO, opts.sleepDuration, buckets, lbDisks); err != nil { - logger.LogIf(ctx, err) + if !isErrBucketNotFound(err) { + logger.LogIf(ctx, err) + } } }(setNumber) } diff --git a/cmd/admin-heal-ops.go b/cmd/admin-heal-ops.go index 604e2f0aa..85e145795 100644 --- a/cmd/admin-heal-ops.go +++ b/cmd/admin-heal-ops.go @@ -21,7 +21,6 @@ import ( "encoding/json" "fmt" "net/http" - "runtime" "sync" "time" @@ -421,7 +420,7 @@ func newHealSequence(ctx context.Context, bucket, objPrefix, clientAddr string, clientToken := mustGetUUID() return &healSequence{ - respCh: make(chan healResult, runtime.GOMAXPROCS(0)), + respCh: make(chan healResult), bucket: bucket, object: objPrefix, reportProgress: true, diff --git a/cmd/background-heal-ops.go b/cmd/background-heal-ops.go index 4505bead5..24b86e307 100644 --- a/cmd/background-heal-ops.go +++ b/cmd/background-heal-ops.go @@ -19,7 +19,6 @@ package cmd import ( "context" "path" - "runtime" "time" "github.com/minio/minio/pkg/madmin" @@ -126,7 +125,7 @@ func (h *healRoutine) run(ctx context.Context, objAPI ObjectLayer) { func newHealRoutine() *healRoutine { return &healRoutine{ - tasks: make(chan healTask, runtime.GOMAXPROCS(0)), + tasks: make(chan healTask), doneCh: make(chan struct{}), } diff --git a/cmd/global-heal.go b/cmd/global-heal.go index 790140691..d65e13494 100644 --- a/cmd/global-heal.go +++ b/cmd/global-heal.go @@ -18,7 +18,6 @@ package cmd import ( "context" - "runtime" "sync" "time" @@ -43,8 +42,8 @@ func newBgHealSequence() *healSequence { } return &healSequence{ - sourceCh: make(chan healSource, runtime.GOMAXPROCS(0)), - respCh: make(chan healResult, runtime.GOMAXPROCS(0)), + sourceCh: make(chan healSource), + respCh: make(chan healResult), startTime: UTCNow(), clientToken: bgHealingUUID, // run-background heal with reserved bucket