Comments (11)
Tried with Netty 4.1.31.Final and issue still persist so looks like some issue with way ordered queries are executed
from azure-cosmosdb-java.
thanks @chetanmeh for reporting this.
@mbhaskar could you please take a look?
from azure-cosmosdb-java.
@chetanmeh Thanks for the PR . We could reproduce the above issue as per the testcase provided. We will get back to you after further analysis
from azure-cosmosdb-java.
@chetanmeh, you did a complete diagnosis, thank you. We are looking at this.
from azure-cosmosdb-java.
@chetanmeh could you please try this and let us know if it resolves the leak issue:
https://github.com/Azure/azure-cosmosdb-java/blob/leak-tmp-fix/HOWTO.md
from azure-cosmosdb-java.
@chetanmeh once you confirm the fix addressed the issue we can do the release to maven.
Could you confirm please?
from azure-cosmosdb-java.
@moderakh The change does seem to fix the issue for us and no leak is observed. For my understanding can you confirm the fix approach?
From the change it appears we are now relying on content subscription timeout to discard the response content if not subscribed to within 1 ms from time of receiving the response? If yes would this cause issue in slow setups (vm env) where genuine cases may see responses being discarded?
Some observations on HTTP calls made
Sorted
For fetching 200 top records total 9 HTTP calls were made (thus fetching 900 records) for our setup having 5 partitions and probably only response from 6-7 were consumed. So unconsumed response from the 2 calls was adding up to leak. With this fix ByteBuf
for those responses would be now released.
UnSorted
For unsorted case only 4 calls were made and all response was consumed
from azure-cosmosdb-java.
@simplynaveen20 will respond.
from azure-cosmosdb-java.
@chetanmeh This content subscription timeout is the default value of RXNetty HttpClientResponse , we tested different scenario and its working fine , please let us know if you find any issue or odd behavior.
from azure-cosmosdb-java.
@simplynaveen20 Yup its part of rxnetty default. My worry was more about the timeout being low like 1 ms which may cause issue on boxes with high CPU contention. For example in one the usage I see it being set to 5 secs
I was trying to see if the unconsumed response can possibly be addressed (irrespective of timeout) by implementing onUnsubscribe
in AsyncOnSubscribe
created in Paginator
where I believe we have access to last invoked request for a partition. But got lost in layers!
Anyways for now in our testing we do not see any issue. Would keep a watch and let you know if we observe any related issue
from azure-cosmosdb-java.
Not observed this issue since updating to latest CosmosDB SDK 2.3.0. Resolving it as closed
from azure-cosmosdb-java.
Related Issues (20)
- In flight http request during failover not moving to other available region
- storePhysicalAddress is null - V2 Java Async SDK HOT 2
- Reliable connection configuration for Azure functions consumption plan HOT 1
- Bump to >2.4.0 yields DocumentClientException/ Request url is invalid. HOT 1
- QueryPlan should be a read request
- Add support of getDuration for Queries in Cosmos Diagnostics - V4 Java Cosmos SDK HOT 1
- FR Add an option to SQL API @Container to set auto scaling = true
- Duplicate results when DISTINCT querying
- "sortedRanges" exception when querying Unique Key IN list HOT 1
- I'm not able to see which branch is for latest version of V3 version (3.7.5) HOT 6
- Connection leak with Cosmos DB client SDK HOT 2
- Getting 404 even though cosmos has document
- Netty issue while using azure cosmos in android
- ETag Check in Cosmos SDK V4 batch
- Including "uri" in the Diagnostic logs
- 同学,您这个项目引入了119个开源组件,存在41个漏洞,辛苦升级一下
- Fail to reach global gateway HOT 1
- This repo is missing important files
- Direct Connectivity Issue from VNET SpringApps to CosmosDB HOT 2
- Java SDK not returning cumulative RU for operations with retries HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-cosmosdb-java.