X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/bfdecdcaf7dbeabfacc0efefb864e0024dbef9ab..e6ccda1f6925da119589e93b54d22508cf979069:/services/keepstore/command.go diff --git a/services/keepstore/command.go b/services/keepstore/command.go index 555f16dfe1..48c8256a3c 100644 --- a/services/keepstore/command.go +++ b/services/keepstore/command.go @@ -186,7 +186,7 @@ func (h *handler) setup(ctx context.Context, cluster *arvados.Cluster, token str // Initialize the trashq and workers h.trashq = NewWorkQueue() - for i := 0; i < 1 || i < h.Cluster.Collections.BlobTrashConcurrency; i++ { + for i := 0; i < h.Cluster.Collections.BlobTrashConcurrency; i++ { go RunTrashWorker(h.volmgr, h.Logger, h.Cluster, h.trashq) } @@ -205,11 +205,14 @@ func (h *handler) setup(ctx context.Context, cluster *arvados.Cluster, token str h.keepClient = &keepclient.KeepClient{ Arvados: ac, Want_replicas: 1, + DiskCacheSize: keepclient.DiskCacheDisabled, } h.keepClient.Arvados.ApiToken = fmt.Sprintf("%x", rand.Int63()) - if d := h.Cluster.Collections.BlobTrashCheckInterval.Duration(); d > 0 { - go emptyTrash(h.volmgr.writables, d) + if d := h.Cluster.Collections.BlobTrashCheckInterval.Duration(); d > 0 && + h.Cluster.Collections.BlobTrash && + h.Cluster.Collections.BlobDeleteConcurrency > 0 { + go emptyTrash(h.volmgr.mounts, d) } return nil