Skip to content
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

Release netty buffers after use #3485

Merged
merged 1 commit into from
Jan 27, 2024

Conversation

easel
Copy link
Contributor

@easel easel commented Jan 26, 2024

Without an explicit release, the netty leak detector occasionally complains of leakage like this:
ERROR i.n.u.ResourceLeakDetector - LEAK: ByteBuf.release() was not called before it's garbage-collected. See https://netty.io/wiki/reference-counted-objects.html for more information. This change immediately
releases the buffer after conversion to Chunk and silences the leak detector.

@kciesielski
Copy link
Member

Thanks a lot! This looks like a potential fix for the fs2 streaming integration, where we suffer from the same issue.

@kciesielski kciesielski merged commit 415e792 into softwaremill:master Jan 27, 2024
23 checks passed
@easel easel deleted the netty-memory-leak branch February 13, 2024 19:53
@easel
Copy link
Contributor Author

easel commented Feb 13, 2024

Thanks for the merge @kciesielski -- this fix seems to have brought with it a performance boost as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants