Azure / azure-cosmosdb-java

Java Async SDK for SQL API of Azure Cosmos DB
MIT License
54 stars 61 forks source link

Improving http request time out avoiding region failover for high latency request #360

Closed simplynaveen20 closed 4 years ago

simplynaveen20 commented 4 years ago

Currently we have an api on ConnectionPolicy setRequestTimeoutInMillis which sets the request time out for both TCP and HTTP requests. We want to cap the lower value of http client request time out to 60 sec, as http network request call ends up into region fail over and also Gateway does not have any sla.

Note: This PR also contains the improvement on AddressResolutionStatistics in ClientSideRequestStatistics, which include error message if there is any failure on address cache refresh call, also including flag inflightRequest which will indicate whether address call finished in lifetime of the the request.

Also closes query plan issue closes https://github.com/Azure/azure-cosmosdb-java/issues/359