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

fix: admin retry logic #2519

Merged
merged 2 commits into from
Jul 23, 2023
Merged

fix: admin retry logic #2519

merged 2 commits into from
Jul 23, 2023

Conversation

hindessm
Copy link
Collaborator

The previous fix in #2515 wasn't correct. While looking at the transaction_manager.go logic, it became clear that the intention is that retry.max should not count the first attempt. This seems very reasonable so this fixes the test and logic to reflect that. The original code would fail this updated test because it didn't make the final required attempt.

It seems like it might be a good idea to have a single retry mechanism to implement all of the requirements of the Config...Retry configs. It might be a v2 issue as the Retry configs aren't currently consistent - some don't have BackoffFunc and those that do take different numbers of arguments.

The previous fix wasn't correct. While looking at the transaction_manager.go
logic, it became clear that the intention is that retry.max should not
count the first attempt. This seems very reasonable so this fixes the test
and logic to reflect that. The original code would
fail this updated test because it didn't make the final required attempt.

Signed-off-by: Mark Hindess <mark.hindess@gmail.com>
Without the previous fix, Retry.Max == 0 would potentially loop
on retryable errors. This is bad so even though it shouldn't happen
now. Make the condition safer.

Signed-off-by: Mark Hindess <mark.hindess@gmail.com>
@dnwe dnwe added the fix label Jul 23, 2023
@dnwe dnwe merged commit 63ff8d1 into IBM:main Jul 23, 2023
13 checks passed
@hindessm hindessm deleted the mrh/fix-retry-logic-again branch July 23, 2023 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants