Skip to content

Retry policy supports service-specific retry logic #5515

@Jinming-Hu

Description

@Jinming-Hu

Is your feature request related to a problem? Please describe.

Storage team needs this feature for one of STG94 features.
We need to decide whether or not to retry a response based on a new response header x-ms-copy-source-error-code.

Describe the solution you'd like

Add an optional field into RetryOptions. This field is a lambda function, taking a raw response as parameter. Service sdk can set this field and add some service-specific logic to determine if a response should be retried.

Describe alternatives you've considered

Something similar to ResponseClassifier in .Net SDK
https://github.com/Azure/azure-sdk-for-net/blob/bb90af89e27be84541e142a4ffd648825a2fdbe2/sdk/storage/Azure.Storage.Common/src/Shared/StorageResponseClassifier.cs

Additional context

None

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Description Added
  • Expected solution specified

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions