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

Core: Default to exponential retry strategy in REST client #8366

Merged
merged 3 commits into from Sep 14, 2023

Conversation

nastra
Copy link
Contributor

@nastra nastra commented Aug 22, 2023

This adds a new retry strategy, allowing exponential backoff and also allows to adjust the number of retries for the DefaultHttpRequestRetryStrategy

@github-actions github-actions bot added the core label Aug 22, 2023
@nastra nastra force-pushed the http-client-retry-behavior branch 3 times, most recently from 86fcb68 to 2c0c7a9 Compare August 22, 2023 06:37
@nastra nastra changed the title Core: Add exponential retry strategy to REST client Core: Default to exponential retry strategy in REST client Aug 22, 2023
@nastra nastra requested a review from rdblue August 24, 2023 15:29
@@ -96,6 +99,9 @@ private HTTPClient(
clientBuilder.addRequestInterceptorLast(requestInterceptor);
}

int maxRetries = PropertyUtil.propertyAsInt(properties, REST_MAX_RETRIES, 5);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a higher retry count than before with the default (which is 1 retry I believe), just wanted to double check that was the intent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes this was the intent to increase the retry

@nastra nastra force-pushed the http-client-retry-behavior branch 2 times, most recently from c0d59bd to 095acf0 Compare September 14, 2023 06:39
@rdblue rdblue merged commit 3a3c6ed into apache:master Sep 14, 2023
41 checks passed
@rdblue
Copy link
Contributor

rdblue commented Sep 14, 2023

Thanks, @nastra!

@nastra nastra deleted the http-client-retry-behavior branch September 15, 2023 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants