Hi all, I am analyzing how memory allocation is organized in Cassandra (4.x-5.x) and have a question about memory allocators usage in Apache Cassandra code.
Some time ago Cassandra-specific networking_cache has been introduced ( https://issues.apache.org/jira/browse/CASSANDRA-15066 + https://issues.apache.org/jira/browse/CASSANDRA-15229) and configured as an allocator for Netty channels in internode messaging as well as in native transport: org.apache.cassandra.net.LocalBufferPoolAllocator org.apache.cassandra.transport.PipelineConfigurator#configureModernPipeline org.apache.cassandra.net.InboundConnectionInitiator.Initializer#initChannel org.apache.cassandra.net.OutboundConnectionInitiator#createBootstrap At the same time there are few places in native transport code where the original Netty PooledByteBufAllocator (org.apache.cassandra.transport.CBUtil#allocator instance) is still in use, like: org.apache.cassandra.transport.Message#encode org.apache.cassandra.transport.Compressor.LZ4Compressor org.apache.cassandra.transport.Compressor.SnappyCompressor Can somebody help to understand: is the usage of different allocators in native transport logic intentional or the original idea was to migrate fully to the Cassandra networking_cache as a Netty allocator? Thank you, Dmitry -- Dmitry Konstantinov