ByteBuffer is not released when compression is enabled, causing pool leakage#883
ByteBuffer is not released when compression is enabled, causing pool leakage#883stIncMale merged 4 commits intomongodb:masterfrom
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
…leakage (mongodb#883) JAVA-4510 Co-authored-by: Konstantin Labun <[email protected]> Co-authored-by: Valentin Kovalenko <[email protected]>
…leakage (mongodb#883) JAVA-4510 Co-authored-by: Konstantin Labun <[email protected]> Co-authored-by: Valentin Kovalenko <[email protected]>
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