From 3aec508aec680c2526ff39ba146251802aed034a Mon Sep 17 00:00:00 2001 From: Hari Bhaskaran Date: Wed, 20 Jul 2022 09:40:49 -0700 Subject: [PATCH] Issue 7570: Check existance of container before creation attempt --- .../azure_backup/BackupContainerAzureBlobStore.actor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdbclient/azure_backup/BackupContainerAzureBlobStore.actor.cpp b/fdbclient/azure_backup/BackupContainerAzureBlobStore.actor.cpp index 0c3ac8ba02..59d31fc8f3 100644 --- a/fdbclient/azure_backup/BackupContainerAzureBlobStore.actor.cpp +++ b/fdbclient/azure_backup/BackupContainerAzureBlobStore.actor.cpp @@ -333,7 +333,10 @@ Future BackupContainerAzureBlobStore::create() { TraceEvent(SevDebug, "BCAzureBlobStoreCreateContainer").detail("ContainerName", containerName); Future createContainerFuture = asyncTaskThread.execAsync([containerName = this->containerName, client = this->client] { - waitAzureFuture(client->create_container(containerName), "create_container"); + auto outcome = client->get_container_properties(containerName).get(); + if (!outcome.success()) { + waitAzureFuture(client->create_container(containerName), "create_container"); + } return Void(); }); Future encryptionSetupFuture = usesEncryption() ? encryptionSetupComplete() : Void();