Repository navigation
Change default read timeout for database account - #39596
Conversation
Fabian Meiswinkel (FabianMeiswinkel)
left a comment
There was a problem hiding this comment.
LGTM - Thanks!
|
API change check APIView has identified API level changes in this PR and created following API reviews. |
β¦into tvaron3/readtimeout
|
/azp run python - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Kushagra Thapar (kushagraThapar)
left a comment
There was a problem hiding this comment.
I know its short notice but, would be good to have a mock test if possible.
Fixed the timeout logic
Fixed the timeout retry policy
Fabian Meiswinkel (FabianMeiswinkel)
left a comment
There was a problem hiding this comment.
LGTM
|
Does this include logic to retry in other regions when |
It does not include this. Kevin Pilch (@Pilchie) |
| elif e.status_code in [StatusCodes.REQUEST_TIMEOUT, StatusCodes.SERVICE_UNAVAILABLE]: | ||
| elif e.status_code == StatusCodes.REQUEST_TIMEOUT: | ||
| retry_policy = timeout_failover_retry_policy | ||
| elif e.status_code >= StatusCodes.INTERNAL_SERVER_ERROR: |
There was a problem hiding this comment.
It's under exceptions.CosmosHttpResponseError as e:
What if the exception is not CosmosHttpResponseError as we mentioned sometimes it's ServiceResponseError before?
There was a problem hiding this comment.
In that case it falls back to below line 205 and line 212 - depending on the type of the error.
For any other error, it will always come here as long as the error is returned by http client.
I can explain more on the call (since the error flow comes from a different class).
* change default read timeout * fix tests * Add read timeout tests for database account calls * fix timeout retry policy * Fixed the timeout logic * Fixed the timeout retry policy * Mock tests for timeout and failover retry policy * Fixed async tests * Updated versions for release and changelog * Add tests for cross region tries --------- Co-authored-by: Kushagra Thapar <kuthapar@microsoft.com> Co-authored-by: Kushagra Thapar <kushuthapar@gmail.com>
* change default read timeout * fix tests * Add read timeout tests for database account calls * fix timeout retry policy * Fixed the timeout logic * Fixed the timeout retry policy * Mock tests for timeout and failover retry policy * Fixed async tests * Updated versions for release and changelog * Add tests for cross region tries --------- Co-authored-by: Kushagra Thapar <kuthapar@microsoft.com> Co-authored-by: Kushagra Thapar <kushuthapar@gmail.com>
Description