Internal: Fixed exception handling around GoneException and RequestTimeoutException#15735
Conversation
…into users/fabianm/GoneAndRequestTimeoutExceptionHandling
|
Looking into options to add some additional test coverage (for admission control and the request timeout exception to gone exception mapping) |
...s/src/main/java/com/azure/cosmos/implementation/directconnectivity/RntbdTransportClient.java
Show resolved
Hide resolved
...c/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestRecord.java
Show resolved
Hide resolved
...ain/java/com/azure/cosmos/implementation/directconnectivity/GoneAndRetryWithRetryPolicy.java
Outdated
Show resolved
Hide resolved
|
/azp run java - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
...mos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentServiceRequest.java
Show resolved
Hide resolved
...ain/java/com/azure/cosmos/implementation/directconnectivity/GoneAndRetryWithRetryPolicy.java
Outdated
Show resolved
Hide resolved
|
/azp run java - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…into users/fabianm/GoneAndRequestTimeoutExceptionHandling
|
/azp run java - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
...ain/java/com/azure/cosmos/implementation/directconnectivity/GoneAndRetryWithRetryPolicy.java
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RetryUtils.java
Outdated
Show resolved
Hide resolved
…into users/fabianm/GoneAndRequestTimeoutExceptionHandling
|
/azp run java - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…into users/fabianm/GoneAndRequestTimeoutExceptionHandling
|
/azp run java - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…into users/fabianm/GoneAndRequestTimeoutExceptionHandling
moderakh
left a comment
There was a problem hiding this comment.
you don't need to wait on address refresh cache when write request result in gone.
you could instead trigger an address cache refresh in background and return the write response immediately.
| shouldRetryResult.policyArg.getValue0() != null && | ||
| shouldRetryResult.policyArg.getValue0()) { | ||
|
|
||
| return addressSelector.resolveAddressesAsync( |
There was a problem hiding this comment.
this is for refreshing address cache on a Gone Exception for write request.
With this approach the write response will get blocked till the unrelated address resolution completes.
you could instead trigger an address cache refresh in background and return the write response immediately.
There was a problem hiding this comment.
Fixed - good catch. Thanks!
...c/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestRecord.java
Show resolved
Hide resolved
moderakh
left a comment
There was a problem hiding this comment.
for failed write, please do the address cache refresh in background.
|
/azp run java - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
kushagraThapar
left a comment
There was a problem hiding this comment.
Overall looks good to me, some minor suggestions and one blocking comment to add Microsoft copyright header to the new file.
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RetryUtils.java
Outdated
Show resolved
Hide resolved
.../main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestManager.java
Show resolved
Hide resolved
...c/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestRecord.java
Outdated
Show resolved
Hide resolved
...azure/cosmos/implementation/directconnectivity/ReplicatedResourceClientGoneForWriteTest.java
Show resolved
Hide resolved
…into users/fabianm/GoneAndRequestTimeoutExceptionHandling
kushagraThapar
left a comment
There was a problem hiding this comment.
Thanks @FabianMeiswinkel looks good to me.
|
/azp run java - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/check-enforcer evaluate |
…into users/fabianm/GoneAndRequestTimeoutExceptionHandling
…which have been sent
|
/azp run java - cosmos - tests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Fixing a couple of issues with the exception handling in the availability stack:
Closes #15363
Closes #15305
Closes #15304