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

[APT-10467] Retry with Exponential Backoff #49

Merged
merged 1 commit into from
Sep 23, 2024
Merged

Conversation

kabliz
Copy link
Contributor

@kabliz kabliz commented Sep 20, 2024

Adds graceful network retries to internet connectivity errors.

And attempts to retry ParserException, in the event that the download partially failed for content being loaded over the internet.

@kschults kschults self-assigned this Sep 20, 2024
if (loadErrorInfo.errorCount > 8) {
C.TIME_UNSET //stop retrying after a few minutes
} else {
//exponential backoff based on a 10 second interval
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you put in what the max backoff will be? My reading is that will be up to 40 minutes, but it should be written down.

C.TIME_UNSET //stop retrying after a few minutes
} else {
//exponential backoff based on a 10 second interval
(1 shl (loadErrorInfo.errorCount - 1).coerceAtMost(8)) * 10 * 1000L
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you need the coerce here - error count will never be more than 8.

Adds graceful network retries to internet connectivity errors.

And attempts to retry `ParserException`, in the event that the download partially failed for content being loaded over the internet.
@kabliz kabliz merged commit 428dd66 into main Sep 23, 2024
6 checks passed
@kabliz kabliz deleted the kabliz/APT-10467-retry branch September 23, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants