21126: Move BlobDeleteConcurrency==0 check up in the stack.
[arvados.git] / services / keepstore / azure_blob_volume.go
index 6e8def82222eb1e169af6fa2632c21b20bc1bdf8..4fb469bdcbbba73be4c4aad728e2938939e11bb4 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-package main
+package keepstore
 
 import (
        "bytes"
@@ -558,6 +558,9 @@ func (v *AzureBlobVolume) translateError(err error) error {
        case strings.Contains(err.Error(), "Not Found"):
                // "storage: service returned without a response body (404 Not Found)"
                return os.ErrNotExist
+       case strings.Contains(err.Error(), "ErrorCode=BlobNotFound"):
+               // "storage: service returned error: StatusCode=404, ErrorCode=BlobNotFound, ErrorMessage=The specified blob does not exist.\n..."
+               return os.ErrNotExist
        default:
                return err
        }
@@ -572,10 +575,6 @@ func (v *AzureBlobVolume) isKeepBlock(s string) bool {
 // 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