Issue 7570: Check existance of container before creation attempt

This commit is contained in:
Hari Bhaskaran 2022-07-20 09:40:49 -07:00
parent a7469b925b
commit 3aec508aec
1 changed files with 4 additions and 1 deletions

View File

@ -333,7 +333,10 @@ Future<Void> BackupContainerAzureBlobStore::create() {
TraceEvent(SevDebug, "BCAzureBlobStoreCreateContainer").detail("ContainerName", containerName);
Future<Void> 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<Void> encryptionSetupFuture = usesEncryption() ? encryptionSetupComplete() : Void();