[ https://issues.apache.org/jira/browse/IGNITE-25441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Tupitsyn updated IGNITE-25441: ------------------------------------ Description: Currently, we allocate response Netty buffers in *ClientInboundMessageHandler* too early - even before the processing has started. As a result, the buffer is out there doing nothing while a potentially long-running async operation is being processed. In case of many clients and many active requests, we'll have a lot of buffers allocated for no reason. Additionally, it is not always possible to ensure buffer release. Some operations may never complete due to bugs, node restarts, etc, causing buffer leaks. To improve the situation: * Release the request buffer as soon as reading is finished * Allocate the response buffer only when the result is ready to write was: Currently, we allocate response Netty buffers in *ClientInboundMessageHandler* too early - even before the processing has started. As a result, the buffer is out there doing nothing while a potentially long-running async operation is being processed. In case of many clients and many active requests, we'll have a lot of buffers allocated for no reason. Additionally, it is not always possible to ensure buffer release. Some operations may never complete due to bugs, node restarts, etc, causing buffer leaks. > Java thin 3.0: optimize Netty buffer usage in ClientInboundMessageHandler > ------------------------------------------------------------------------- > > Key: IGNITE-25441 > URL: https://issues.apache.org/jira/browse/IGNITE-25441 > Project: Ignite > Issue Type: Improvement > Components: thin clients ai3 > Reporter: Pavel Tupitsyn > Assignee: Pavel Tupitsyn > Priority: Major > Labels: ignite-3 > Fix For: 3.1 > > > Currently, we allocate response Netty buffers in > *ClientInboundMessageHandler* too early - even before the processing has > started. As a result, the buffer is out there doing nothing while a > potentially long-running async operation is being processed. In case of many > clients and many active requests, we'll have a lot of buffers allocated for > no reason. > Additionally, it is not always possible to ensure buffer release. Some > operations may never complete due to bugs, node restarts, etc, causing buffer > leaks. > To improve the situation: > * Release the request buffer as soon as reading is finished > * Allocate the response buffer only when the result is ready to write -- This message was sent by Atlassian Jira (v8.20.10#820010)