-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Adding back-off cap of 5 seconds for 429 and skipping metadata calls for queries with partitioning strategy Restrictive #28764
Conversation
API change check for API changes are not detected in this pull request for |
…queries with partitioning strategy restrictive
...azure-cosmos-spark_3_2-12/src/main/scala/com/azure/cosmos/spark/CosmosPartitionPlanner.scala
Outdated
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosException.java
Show resolved
Hide resolved
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, thanks for the quick fix and solution 👍
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.
@FabianMeiswinkel - I see we have not updated the other places where we use retry-after duration like, BatchExecUtils
, and in BatchResponseParser
#getRetryAfterDuration()
Any reason for not changing these?
Good catch - I initially thought it isn't necessary to also cap the back-off time here, because when a BatchResponse overall result is 429 it gets ultimately converted into CosmosException (and we would have the cap there). But for Bulk it is possible that 429 is just one of the inner results - and there applying the cap would be needed. So I changed this to also always cap the BacthResult back-off. |
Description
This PR contains two small optimizations
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines