Skip to content

Fix async waiting in DynamoDBRetryPolicy. #3842

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

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

teo-tsirpanis
Copy link
Contributor

@teo-tsirpanis teo-tsirpanis commented May 26, 2025

Description

This PR updates DynamoDBRetryPolicy to override the WaitBeforeRetryAsync method in order to use the updated retry logic for async retries in addition to sync ones.

Motivation and Context

Noticed as part of a larger clean-up effort, and split into its own branch.

Testing

N/A

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed

License

  • I confirm that this pull request can be released under the Apache 2 license

@teo-tsirpanis teo-tsirpanis changed the title Fix sync-over-async on DynamoDBRetryPolicy. Fix sync-over-async in DynamoDBRetryPolicy. May 26, 2025
@dscpinheiro dscpinheiro changed the base branch from main to development May 27, 2025 01:04
@teo-tsirpanis teo-tsirpanis marked this pull request as draft May 27, 2025 11:14
@teo-tsirpanis teo-tsirpanis marked this pull request as ready for review May 27, 2025 22:19
@teo-tsirpanis teo-tsirpanis requested a review from dscpinheiro May 27, 2025 22:19
@peterrsongg peterrsongg requested a review from normj May 28, 2025 17:42
@teo-tsirpanis teo-tsirpanis changed the title Fix sync-over-async in DynamoDBRetryPolicy. Fix async waiting in DynamoDBRetryPolicy. Jun 1, 2025
@teo-tsirpanis
Copy link
Contributor Author

Turns out that without this PR, we will not block the thread, but will fall back to the default and non-DynamoDB-specific retry logic. Updated PR title and description.

@muhammad-othman
Copy link
Member

Running internal dry run DRY_RUN-8a5da552-276c-4742-9f14-867dc629ab26.

Copy link
Member

@muhammad-othman muhammad-othman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added dev config and internal dry run succeeded DRY_RUN-8a5da552-276c-4742-9f14-867dc629ab26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants