Is flush() necessary for releasing pooled buffers? #15632
-
|
Hi, I'm investigating a buffer leak and was wondering if I understood some parts Afaik, Netty takes care of releasing buffers written to a channel. From https://netty.io/wiki/new-and-noteworthy-in-4.0.html#write-does-not-flush-automatically
From https://netty.io/wiki/new-and-noteworthy-in-4.0.html#pooled-buffers
This reads to me like we need to actually send data to release the message and return ByteBuf back to the pool, is it correct? I.e, I have a handler that is using a pooled buffer and don't use neither and other outbound handlers in the pipeline also use plain Leak report: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
|
Pretty sure it's not necessary, a normal write is enough. Your issue is elsewhere. |
Beta Was this translation helpful? Give feedback.
Turns out we faced some regression on 4.1.125: our tests were flaky on 4.1.116, upgrade to 4.1.124 helped to get rid of buf-leak flakiness (so issue resolved somewhere in between) and then with 4.1.125 tests again became flaky.
Not sure which change in 4.1.125 is causing troubles, many 4.1.125 commits are about HTTP, irrelevant for this particular leak report.
Closing this, we will stick to version 4.1.124 for now.
crate/crate#18340 (comment)