python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

WIP: Retry with native grpc

Open elena-kolevska opened this issue 1 year ago • 0 comments

Description

This is one of the possible options we're looking at for implementing retry policies.

gRPC specifies that retry policy definitions should be defined on the service itself and transmitted to the client through the service config mechanism (https://github.com/grpc/proposal/blob/master/A6-client-retries.md). All gRPC clients are supposed to execute the retries, based on the policy.

This PR specifies the retry policy service config on the client. It's a very clean way to do it, with minimal code change, but there's two main drawbacks:

  • It doesn't handle statuses that have a RetryInfo detail where the server instructs the client when it should retry the request
  • It can not handle the requirement for infinite retries defined in our proposal, the maximum retry attempts it allows is 5.

elena-kolevska avatar Feb 27 '24 11:02 elena-kolevska