-
Notifications
You must be signed in to change notification settings - Fork 1.5k
ByteBuffer is not released when compression is enabled, causing pool leakage #883
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
Conversation
An alternative way to address the issue can be buffer release as part of |
Hi @kulabun, Thank you for the PR. I looked through the class Using your code from JAVA-4510 I confirmed that after the changes threads are not blocked due to |
driver-core/src/main/com/mongodb/internal/connection/InternalStreamConnection.java
Outdated
Show resolved
Hide resolved
driver-core/src/main/com/mongodb/internal/connection/InternalStreamConnection.java
Outdated
Show resolved
Hide resolved
JAVA-4510
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…leakage (mongodb#883) JAVA-4510 Co-authored-by: Konstantin Labun <konstantinlabun@Konstantins-Air.Home> Co-authored-by: Valentin Kovalenko <valentin.kovalenko@mongodb.com>
…leakage (mongodb#883) JAVA-4510 Co-authored-by: Konstantin Labun <konstantinlabun@Konstantins-Air.Home> Co-authored-by: Valentin Kovalenko <valentin.kovalenko@mongodb.com>
Hey Mongo team.
My team experienced an increased number of failures caused by latency recently. Further investigation showed that InternalStreamConnection doesn't close buffers returned by PowerOfTwoBufferPool when compression is enabled. It leads to permits leakage. After INTEGER_MAX buffer retrievals buffer pool is fully exhausted and all following requests would be blocked indefinitely unless the thread gets interrupted.
JAVA-4510