// EmptyTrash looks for trashed blocks that exceeded BlobTrashLifetime
// and deletes them from the volume.
func (v *AzureBlobVolume) EmptyTrash() {
- if v.cluster.Collections.BlobDeleteConcurrency < 1 {
- return
- }
-
var bytesDeleted, bytesInTrash int64
var blocksDeleted, blocksInTrash int64
}
h.keepClient.Arvados.ApiToken = fmt.Sprintf("%x", rand.Int63())
- if d := h.Cluster.Collections.BlobTrashCheckInterval.Duration(); d > 0 {
+ if d := h.Cluster.Collections.BlobTrashCheckInterval.Duration(); d > 0 &&
+ h.Cluster.Collections.BlobTrash &&
+ h.Cluster.Collections.BlobDeleteConcurrency > 0 {
go emptyTrash(h.volmgr.writables, d)
}
// EmptyTrash looks for trashed blocks that exceeded BlobTrashLifetime
// and deletes them from the volume.
func (v *S3AWSVolume) EmptyTrash() {
- if v.cluster.Collections.BlobDeleteConcurrency < 1 {
- return
- }
-
var bytesInTrash, blocksInTrash, bytesDeleted, blocksDeleted int64
// Define "ready to delete" as "...when EmptyTrash started".
// EmptyTrash walks hierarchy looking for {hash}.trash.*
// and deletes those with deadline < now.
func (v *UnixVolume) EmptyTrash() {
- if v.cluster.Collections.BlobDeleteConcurrency < 1 {
- return
- }
-
var bytesDeleted, bytesInTrash int64
var blocksDeleted, blocksInTrash int64