RetryCapacityExceededException
not being thrown as expected when circuitBreakerMode
is tripped in the StandardRetryStrategy
#1321
Labels
bug
This issue is a bug.
Describe the bug
When using the
StandardRetryStrategy
in the SDK,circuitBreakerMode
is enabled by default. When launching a highly concurrent workload and getting throttled by an AWS service, the token bucket capacity is quickly consumed and results in the circuit breaker mode being activated and an exception being thrown.The exception should be
RetryCapacityExceededException("Insufficient capacity to attempt another retry")
, but is instead the retryable exception returned from the AWS service, leading to confusion as to what's causing the failure.Expected behavior
Ensure that the correct exception is thrown with a useful message, recommending users to disable
circuitBreakerMode
if needed.Current behavior
A retryable service exception is thrown, which is confusing because it appears like it should have been retried.
Steps to Reproduce
Launch 300 parallel calls to
lambda::ListFunctions
. Most of them will get throttled, and circuit breaker mode will trip, but the exception thrown is not the expected one.Exception with stack trace:
Possible Solution
Make sure the
RetryCapacityExceededException
is not somehow being suppressed.Context
Related to #1318. If the correct exception was thrown, the user could have determined the cause quicker.
AWS SDK for Kotlin version
1.2.23
Platform (JVM/JS/Native)
JVM
Operating system and version
macOS Sonoma
The text was updated successfully, but these errors were encountered: