-
Notifications
You must be signed in to change notification settings - Fork 275
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
Retry Cosmos requests after delay when they return 429 #1205
Conversation
Refactor Cosmos logic into separate class
Codecov Report
@@ Coverage Diff @@
## master #1205 +/- ##
=========================================
Coverage 83.62% 83.62%
Complexity 57 57
=========================================
Files 6 6
Lines 348 348
Branches 38 38
=========================================
Hits 291 291
Misses 45 45
Partials 12 12 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor comments.
ambry-cloud/src/main/java/com.github.ambry.cloud/CloudTokenPersistor.java
Outdated
Show resolved
Hide resolved
ambry-cloud/src/main/java/com.github.ambry.cloud/azure/CosmosDataAccessor.java
Outdated
Show resolved
Hide resolved
ambry-cloud/src/main/java/com.github.ambry.cloud/azure/AzureCloudDestination.java
Outdated
Show resolved
Hide resolved
ambry-cloud/src/main/java/com.github.ambry.cloud/azure/AzureCloudDestination.java
Outdated
Show resolved
Hide resolved
ambry-cloud/src/main/java/com.github.ambry.cloud/azure/CosmosDataAccessor.java
Show resolved
Hide resolved
I added the retry logic for queries as well, since the logs showed the 429 errors being thrown for them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Refactor Cosmos logic into separate class