-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Don't over-allocate in HeapBufferedAsyncEntityConsumer in order to consume the response #9993
Conversation
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
…nsume the response Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Compatibility status:Checks if related components are compatible with change 696f412 Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git] |
client/rest/src/main/java/org/opensearch/client/nio/HeapBufferedAsyncEntityConsumer.java
Show resolved
Hide resolved
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## main #9993 +/- ##
============================================
+ Coverage 71.09% 71.14% +0.05%
- Complexity 58083 58125 +42
============================================
Files 4824 4824
Lines 273897 273904 +7
Branches 39910 39912 +2
============================================
+ Hits 194714 194856 +142
+ Misses 62830 62745 -85
+ Partials 16353 16303 -50
|
…nsume the response (opensearch-project#9993) Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
…nsume the response (opensearch-project#9993) Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Signed-off-by: Ivan Brusic <ivan.brusic@flocksafety.com>
…nsume the response (opensearch-project#9993) Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
…nsume the response (opensearch-project#9993) Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Description
The HeapBufferedAsyncEntityConsumer over-allocates the response buffer (up to configured limit, by default of 100Mb) in order to consume the response. This may not be an issue in most cases but if there are many requests being sent in parallel, the memory overhead will be noticeable.
This is not a memory leak (all resources are properly closed) but the consequences of over committing the heap buffers.
Related Issues
Closes #9866
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.