Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport] Unified retry / auto-retry filter support #2020

Merged
merged 4 commits into from
Dec 14, 2021

Conversation

tkountis
Copy link
Contributor

@tkountis tkountis commented Dec 14, 2021

Motivation:

Use of AutoRetry alongside a RetryingHttpRequesterFilter creates issues with the retrying logic exponentially increasing to the product of the two max-retry settings. The conflict arises when both solutions are configured to retry RetryableExceptions which is the case by default.

Modifications:

  • AutoRetry logic is deprecated, to be removed in the future.
  • The logic of the AutoRetry is merged with the RetryingHttpRequesterFilter which now allows retryable flows. Different exceptions can have different retry, as well as support for retries of responses.

Results:

Unified API for retries.

Note:

This is a cherry-picked combination of 3 PRs to the main branch, see #1905, #2004, #2018.

@tkountis tkountis added API PR with API changes (New or Deprecated) Backport Cherry-picks and back-ports of issues already merged to main labels Dec 14, 2021
@tkountis tkountis self-assigned this Dec 14, 2021
Motivation:

Use of AutoRetry alongside a RetryingHttpRequesterFilter creates issues with the retrying logic exponentially increasing to the product of the two max-retry settings. The conflict arises when both solutions are configured to retry RetryableExceptions which is the case by default.

Modifications:

AutoRetry logic is deprecated, to be removed in the future.
The logic of the AutoRetry is merged with the RetryingHttpRequesterFilter which now allows retryable flows. Different exceptions can have different retry, as well as support for retries of responses.

Results:

Unified API

(cherry picked from commit 7f0b3b3)
* Minor improvements for uniform retry-filter

(cherry picked from commit bbae7d0)
Motivation:

New retrying http request filter has bug when the factory is shared across client builders.

Modifications:

Internalized the state to the filter, where the lazy injection now happens rather than the factory as it was before.

Result:

Safer implementation

(cherry picked from commit cbd3e41)
@idelpivnitskiy idelpivnitskiy merged commit 0d70851 into 0.41 Dec 14, 2021
@idelpivnitskiy idelpivnitskiy deleted the retry-backport branch December 14, 2021 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API PR with API changes (New or Deprecated) Backport Cherry-picks and back-ports of issues already merged to main
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants