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

Availability: Fixes retry behavior on HttpException #2077

Merged
merged 4 commits into from
Dec 17, 2020

Conversation

ealsur
Copy link
Member

@ealsur ealsur commented Dec 17, 2020

Description

When users are using PreferredRegions, and an HttpException arises that marks the current region unavailable, the region is marked unavailable, which moves it to the bottom of the priority list.

In a scenario where the account has 2 regions marked as preferred, and a read request failed with HttpException, the algorithm was, after marking the region unavailable, selecting to retry on the second region in the list, which is basically the one that failed because marking it unavailable moved it to the bottom of the list.

This PR slightly changes the logic to always pick the first preferred region on this scenario, which would be the next preferred region after the current one is marked unavailable.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

@ealsur ealsur added the bug Something isn't working label Dec 17, 2020
@ealsur ealsur self-assigned this Dec 17, 2020
@ealsur ealsur merged commit 18d94d0 into master Dec 17, 2020
@ealsur ealsur deleted the users/ealsur/httpretry branch December 17, 2020 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants