skip metacache entries healing to speed up startup

This commit is contained in:
Harshavardhana 2020-12-02 21:15:58 -08:00
parent 44e23b7f4f
commit 951b6b203b

View File

@ -21,6 +21,7 @@ import (
"encoding/json"
"fmt"
"net/http"
"strings"
"sync"
"time"
@ -676,9 +677,7 @@ func (h *healSequence) queueHealTask(source healSource, healType madmin.HealItem
}
// Wait and proceed if there are active requests
if opts.IOCount > 0 {
waitForLowHTTPReq(opts.IOCount, opts.Sleep)
}
waitForLowHTTPReq(opts.IOCount, opts.Sleep)
h.mutex.Lock()
h.scannedItemsMap[healType]++
@ -821,6 +820,11 @@ func (h *healSequence) healMinioSysMeta(objAPI ObjectLayer, metaPrefix string) f
return errHealStopSignalled
}
// Skip metacache entries healing
if strings.HasPrefix(object, "buckets/.minio.sys/.metacache/") {
return nil
}
err := h.queueHealTask(healSource{
bucket: bucket,
object: object,