Browse Source

Avoid double-wrapping allocator (#49534)

When using unpooled, the allocator is wrapped twice in a NoDirectBuffers.
Yannick Welsch 5 năm trước cách đây
mục cha
commit
403b9389e0

+ 1 - 1
modules/transport-netty4/src/main/java/org/elasticsearch/transport/NettyAllocator.java

@@ -44,7 +44,7 @@ public class NettyAllocator {
         } else {
             ByteBufAllocator delegate;
             if (useUnpooled()) {
-                delegate = new NoDirectBuffers(UnpooledByteBufAllocator.DEFAULT);
+                delegate = UnpooledByteBufAllocator.DEFAULT;
             } else {
                 int nHeapArena = PooledByteBufAllocator.defaultNumHeapArena();
                 int pageSize = PooledByteBufAllocator.defaultPageSize();