Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Blob Storage Retention Error When Deleting Generation #584

Open
jdoiro3 opened this issue May 10, 2024 · 0 comments
Open

Azure Blob Storage Retention Error When Deleting Generation #584

jdoiro3 opened this issue May 10, 2024 · 0 comments

Comments

@jdoiro3
Copy link

jdoiro3 commented May 10, 2024

Issue Description

When deleting a generation during retention checking, I've encountered a Azure API error. It looks like you're looping over the blob's but not deleting the ones that mimic a directory last, after deleting the files first.

for _, item := range resp.Segment.BlobItems {
internal.OperationTotalCounterVec.WithLabelValues(ReplicaClientType, "DELETE").Inc()
blobURL := c.containerURL.NewBlobURL(item.Name)
if _, err := blobURL.Delete(ctx, azblob.DeleteSnapshotsOptionNone, azblob.BlobAccessConditions{}); isNotExists(err) {
continue
} else if err != nil {
return err
}

I might be missing something so please let me know if this is a config error on my end.

Relevant Error Logs

time=2024-05-08T23:52:33.957Z level=ERROR msg="retainer error" db=/var/data/some.db replica=abs error="delete generation: -> github.com/Azure/azure-storage-blob-go/azblob.newStorageError, /go/pkg/mod/github.com/!azure/[email protected]/azblob/zc_storage_error.go:42\n===== RESPONSE ERROR (ServiceCode=DirectoryIsNotEmpty) 
@jdoiro3 jdoiro3 changed the title Azure Blob Storage Retainer Error When Deleting Generation Azure Blob Storage Retention Error When Deleting Generation May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant