Skip to content

Commit 620460c

Browse files
committed
azure: increase default number of retries
This adds the cloudstorage.azure.max_retries setting to mirror the setting present in the S3 cloud client. The default retry count is changed from 3 to 10. This allows Azure to pass the 30 second brown out test added by #152692. Release note: Increase the default number of times CRDB will retry failures on Azure. Epic: CRDB-53946
1 parent 1303c66 commit 620460c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pkg/cloud/azure/azure_storage.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ var maxConcurrentUploadBuffers = settings.RegisterIntSetting(
4242
1,
4343
settings.WithPublic)
4444

45+
var maxRetries = settings.RegisterIntSetting(
46+
settings.ApplicationLevel,
47+
"cloudstorage.azure.max_retries",
48+
"the maximum number of retries per Azure operation",
49+
10)
50+
4551
// A note on Azure authentication:
4652
//
4753
// The standardized way to authenticate a third-party identity to the Azure
@@ -233,6 +239,9 @@ func makeAzureStorage(
233239
}
234240
var opts service.ClientOptions
235241
opts.Transport = t
242+
// Azure SDK defaults to 3 retries, which is too low to survive the 30 second
243+
// brownout in TestAzureFaultInjection.
244+
opts.Retry.MaxRetries = int32(maxRetries.Get(&args.Settings.SV))
236245

237246
var azClient *service.Client
238247
switch conf.Auth {

0 commit comments

Comments
 (0)