mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 18:02:31 +08:00
Issue 7570: Check existance of container before creation attempt
This commit is contained in:
parent
a7469b925b
commit
3aec508aec
@ -333,7 +333,10 @@ Future<Void> BackupContainerAzureBlobStore::create() {
|
|||||||
TraceEvent(SevDebug, "BCAzureBlobStoreCreateContainer").detail("ContainerName", containerName);
|
TraceEvent(SevDebug, "BCAzureBlobStoreCreateContainer").detail("ContainerName", containerName);
|
||||||
Future<Void> createContainerFuture =
|
Future<Void> createContainerFuture =
|
||||||
asyncTaskThread.execAsync([containerName = this->containerName, client = this->client] {
|
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();
|
return Void();
|
||||||
});
|
});
|
||||||
Future<Void> encryptionSetupFuture = usesEncryption() ? encryptionSetupComplete() : Void();
|
Future<Void> encryptionSetupFuture = usesEncryption() ? encryptionSetupComplete() : Void();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user