Fix AdaptiveRetry to retry retriable Left errors when shouldPayFailureCost is false#451
Open
adamw wants to merge 2 commits into
Open
Fix AdaptiveRetry to retry retriable Left errors when shouldPayFailureCost is false#451adamw wants to merge 2 commits into
adamw wants to merge 2 commits into
Conversation
…t when shouldPayFailureCost is false
Member
Author
|
The failure is clear and consistent across both Java 21 and 24 matrix entries. Here's the summary: CI failure: Both matrix jobs (Java 21 and Java 24) fail on the same test: The assertion at line 229 expects the retry count to reach 6 (i.e., the operation retried the full number of times without being halted by failure cost), but got 1 — meaning |
…ee when shouldPayFailureCost is false
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
shouldPayFailureCostreturns false for a retriable Left error, AdaptiveRetry was incorrectly stopping retries instead of continuing them. This meant that errors configured to not incur a failure cost would halt prematurely rather than retrying for free.The fix changes the logic to return
ScheduleStop.NowhenshouldPayFailureCostis false, ensuring that retriable errors continue to be retried without consuming tokens from the bucket.Added a test case verifying that all retry attempts execute when
shouldPayFailureCostreturns false, confirming 1 initial attempt plus 5 configured retries are all performed.Fixes #442.
Closes #442.