Merge pull request #7641 from harikb/upstream-clean

Backups, Azure, Issue 7570: Check existance of container before creation attempt
This commit is contained in:
Trevor Clinkenbeard 2022-07-20 12:43:54 -07:00 committed by GitHub
commit 1020d5b1ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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();