diff --git a/src/core/Akka.Remote/Configuration/Remote.conf b/src/core/Akka.Remote/Configuration/Remote.conf index 27f463a6dca..184f2a4928f 100644 --- a/src/core/Akka.Remote/Configuration/Remote.conf +++ b/src/core/Akka.Remote/Configuration/Remote.conf @@ -432,11 +432,6 @@ akka { # i.e. how long a connect may take until it is timed out connection-timeout = 15 s - # Toggles buffer pooling on and off inside DotNetty. - # Only intended to be a work-around for users who are still running on DotNetty v0.4.6-v0.4.7 - # for the following bug: https://github.com/akkadotnet/akka.net/issues/3370 - enable-pooling = true - # PERFORMANCE TUNING # # The batching feature of DotNetty is designed to help batch together logical writes into a smaller diff --git a/src/core/Akka.Remote/Transport/DotNetty/DotNettyTransport.cs b/src/core/Akka.Remote/Transport/DotNetty/DotNettyTransport.cs index c02fb60d2cf..b9c97212f74 100644 --- a/src/core/Akka.Remote/Transport/DotNetty/DotNettyTransport.cs +++ b/src/core/Akka.Remote/Transport/DotNetty/DotNettyTransport.cs @@ -275,7 +275,7 @@ protected Bootstrap ClientFactory(Address remoteAddress) .Option(ChannelOption.TcpNodelay, Settings.TcpNoDelay) .Option(ChannelOption.ConnectTimeout, Settings.ConnectTimeout) .Option(ChannelOption.AutoRead, false) - .Option(ChannelOption.Allocator, Settings.EnableBufferPooling ? (IByteBufferAllocator)PooledByteBufferAllocator.Default : UnpooledByteBufferAllocator.Default) + .Option(ChannelOption.Allocator, UnpooledByteBufferAllocator.Default) .ChannelFactory(() => Settings.EnforceIpFamily ? new TcpSocketChannel(addressFamily) : new TcpSocketChannel()) @@ -386,7 +386,7 @@ private ServerBootstrap ServerFactory() .Option(ChannelOption.TcpNodelay, Settings.TcpNoDelay) .Option(ChannelOption.AutoRead, false) .Option(ChannelOption.SoBacklog, Settings.Backlog) - .Option(ChannelOption.Allocator, Settings.EnableBufferPooling ? (IByteBufferAllocator)PooledByteBufferAllocator.Default : UnpooledByteBufferAllocator.Default) + .Option(ChannelOption.Allocator, UnpooledByteBufferAllocator.Default) .ChannelFactory(() => Settings.EnforceIpFamily ? new TcpServerSocketChannel(addressFamily) : new TcpServerSocketChannel()) diff --git a/src/core/Akka.Remote/Transport/DotNetty/TcpTransport.cs b/src/core/Akka.Remote/Transport/DotNetty/TcpTransport.cs index 4f75042f8d8..53087dfc87b 100644 --- a/src/core/Akka.Remote/Transport/DotNetty/TcpTransport.cs +++ b/src/core/Akka.Remote/Transport/DotNetty/TcpTransport.cs @@ -183,8 +183,6 @@ public override bool Write(ByteString payload) [MethodImpl(MethodImplOptions.AggressiveInlining)] private static IByteBuffer ToByteBuffer(IChannel channel, ByteString payload) { - //TODO: optimize DotNetty byte buffer usage - // (maybe custom IByteBuffer working directly on ByteString?) var buffer = Unpooled.WrappedBuffer(payload.ToByteArray()); return buffer; }