Describe the bug
When a CompletableFuture<?> is requested out of the DynamoDbAsyncClient, (such as a request to software.amazon.awssdk.enhanced.dynamodb.DynamoDbAsyncTable#getItem) the future will never return if a RetryCondition check throws an exception (such as NullPointerException).
References:
software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClient
software.amazon.awssdk.core.retry.conditions.RetryCondition
software.amazon.awssdk.enhanced.dynamodb.DynamoDbAsyncTable#getItem
Regression Issue
Expected Behavior
- Complete the original future with the exception thrown by the retry policy, or...
- At the very minimum log the exception! Right now it is lost forever with no trace 😭
Current Behavior
- The future returned from the
DynamoDbAsyncTable#getItem or similar request never completes. It will hang forever.
- If you don't have manual timeout wrappers around this then it may hang processing threads forever.
Reproduction Steps
- Configure a
DynamoDbAsyncClient
- Supply the client with a
RetryCondition
- This condition needs to throw an exception when it is called
- Perform a request that fails for some reason and will check the
RetryCondition
Possible Solution
No response
Additional Information/Context
We discovered this because there was a legitimate error in our configuration code. The retry check was throwing a NullPointerException, but there was no trace of it. Nothing to stdout, nothing to any logs that we could find. It took over a week to locate.
AWS Java SDK version used
2.28.1, 2.31.15
JDK version used
openjdk version "17.0.14" 2025-01-21
Operating System and version
macOS (Sequoia 15.3.2), Amazon Linux 2023 (2023.7.20250331)
Describe the bug
When a
CompletableFuture<?>is requested out of theDynamoDbAsyncClient, (such as a request tosoftware.amazon.awssdk.enhanced.dynamodb.DynamoDbAsyncTable#getItem) the future will never return if aRetryConditioncheck throws an exception (such asNullPointerException).References:
software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClientsoftware.amazon.awssdk.core.retry.conditions.RetryConditionsoftware.amazon.awssdk.enhanced.dynamodb.DynamoDbAsyncTable#getItemRegression Issue
Expected Behavior
Current Behavior
DynamoDbAsyncTable#getItemor similar request never completes. It will hang forever.Reproduction Steps
DynamoDbAsyncClientRetryConditionRetryConditionPossible Solution
No response
Additional Information/Context
We discovered this because there was a legitimate error in our configuration code. The retry check was throwing a
NullPointerException, but there was no trace of it. Nothing to stdout, nothing to any logs that we could find. It took over a week to locate.AWS Java SDK version used
2.28.1, 2.31.15
JDK version used
openjdk version "17.0.14" 2025-01-21
Operating System and version
macOS (Sequoia 15.3.2), Amazon Linux 2023 (2023.7.20250331)