Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

azureblob: wait for up to 60s to create a just deleted container

Nick Craig-Wood8b8220c4f7a5
diff --git a/backend/azureblob/azureblob.go b/backend/azureblob/azureblob.go
index 55e1517c7..28d6d6ff1 100644
--- a/backend/azureblob/azureblob.go
+++ b/backend/azureblob/azureblob.go
@@ -706,6 +706,11 @@ func (f *Fs) Mkdir(dir string) error {
f.containerOK = true
return false, nil
case azblob.ServiceCodeContainerBeingDeleted:
+ // From https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container
+ // When a container is deleted, a container with the same name cannot be created
+ // for at least 30 seconds; the container may not be available for more than 30
+ // seconds if the service is still processing the request.
+ time.Sleep(6 * time.Second) // default 10 retries will be 60 seconds
f.containerDeleted = true
return true, err
}