Skip to content

Commit 05cda2c

Browse files
edits
1 parent b601edd commit 05cda2c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/storage/blobs/storage-retry-policy-go.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ In this article, you learn how to use the Azure Storage client module for Go to
2020

2121
Retry policies for Blob Storage are configured programmatically, offering control over how retry options are applied to various service requests and scenarios. For example, a web app issuing requests based on user interaction might implement a policy with fewer retries and shorter delays to increase responsiveness and notify the user when an error occurs. Alternatively, an app or component running batch requests in the background might increase the number of retries and use an exponential backoff strategy to allow the request time to complete successfully.
2222

23-
The following table lists the fields available to configure in a [RetryOptions](/java/api/com.azure.storage.common.policy.requestretryoptions) instance, along with the type, a brief description, and the default value if you make no changes. You should be proactive in tuning the values of these properties to meet the needs of your app.
23+
The following table lists the fields available to configure in a [RetryOptions](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore/policy#RetryOptions) instance, along with the type, a brief description, and the default value if you make no changes. You should be proactive in tuning the values of these properties to meet the needs of your app.
2424

2525
| Property | Type | Description | Default value |
2626
| --- | --- | --- | --- |
2727
| `MaxRetries` | `int32` | Optional. Specifies the maximum number of attempts a failed operation is retried before producing an error. A value less than zero means one try and no retries. | 3 |
28-
| `TryTimeout` | `time.Duration` | Optional. Indicates the maximum time allowed for any single try of an HTTP request. Specify a value greater than zero to enable. Note: Setting this to a small value might cause premature HTTP request timeouts. | Disabled by default. |
29-
| `RetryDelay` | `time.Duration` | Optional. Specifies the initial amount of delay to use before retrying an operation. The value is used only if the HTTP response does not contain a Retry-After header. The delay increases exponentially with each retry up to the maximum specified by MaxRetryDelay. A value less than zero means no delay between retries. | 4 seconds |
28+
| `TryTimeout` | `time.Duration` | Optional. Indicates the maximum time allowed for any single try of an HTTP request. Specify a value greater than zero to enable. Note: Setting this field to a small value might cause premature HTTP request timeouts. | Disabled by default. |
29+
| `RetryDelay` | `time.Duration` | Optional. Specifies the initial amount of delay to use before retrying an operation. The value is used only if the HTTP response doesn't contain a Retry-After header. The delay increases exponentially with each retry up to the maximum specified by MaxRetryDelay. A value less than zero means no delay between retries. | 4 seconds |
3030
| `MaxRetryDelay` | `time.Duration` | Optional. Specifies the maximum delay allowed before retrying an operation. Typically, the value is greater than or equal to the value specified in `RetryDelay`. A value less than zero means there's no maximum. | 60 seconds |
3131
| `StatusCodes` | []int | Optional. Specifies the HTTP status codes that indicate the operation should be retried. Specifying values replaces the default values. Specifying an empty slice disables retries for HTTP status codes. | 408 - http.StatusRequestTimeout</br>429 - http.StatusTooManyRequests</br>500 - http.StatusInternalServerError</br>502 - http.StatusBadGateway</br>503 - http.StatusServiceUnavailable</br>504 - http.StatusGatewayTimeout |
3232
| `ShouldRetry` | `func(*http.Response, error) bool` | Optional. evaluates if the retry policy should retry the request. When specified, the function overrides comparison against the list of HTTP status codes and error checking within the retry policy. `Context` and `NonRetriable` errors remain evaluated before calling `ShouldRetry`. The `*http.Response` and `error` parameters are mutually exclusive, that is, if one is `nil`, the other isn't `nil`. A return value of true means the retry policy should retry. | |

0 commit comments

Comments
 (0)