eolivelli commented on a change in pull request #2441:
URL: https://github.com/apache/bookkeeper/pull/2441#discussion_r505318850
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieProtoEncoding.java
##########
@@ -356,10 +356,10 @@ public Object encode(Object msg, ByteBufAllocator
allocator) throws Exception {
private static ByteBuf serializeProtobuf(MessageLite msg, ByteBufAllocator
allocator) {
int size = msg.getSerializedSize();
- ByteBuf buf = allocator.heapBuffer(size, size);
+ ByteBuf buf = allocator.directBuffer(size, size);
Review comment:
shall we add a comment that explains why this is better ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]