-
-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Netty still uses heap buffers while preferDirect is true #9345
Copy link
Copy link
Closed
Description
Before https://github.com/netty/netty/pull/9167/files I thought that heap buffers within our app is normal. Now, it seems to be another issue.
With 4.1.37.Final I still see heap buffers usage. In logs I found this instances:
DefaultFullHttpResponse(decodeResult: success, version: HTTP/1.1, content: UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 0, widx: 0, cap: 0))
Look like this is due to DefaultFullHttpResponse that uses inside Unpooled.buffer(0). Search shows Unpooled.buffer(0) usage in 20 different places within current netty codebase (mostly in http and websockets package).
My question - is that expected? Shouldn't DefaultFullHttpResponse use Unpooled.EMPTY_BUFFER instead of Unpooled.buffer(0)?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels