lhotari commented on code in PR #4289:
URL: https://github.com/apache/bookkeeper/pull/4289#discussion_r1566705489
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java:
##########
@@ -845,7 +845,7 @@ void addEntry(final long ledgerId, byte[] masterKey, final
long entryId, Referen
// usually checked in writeAndFlush, but we have extra check
// because we need to release toSend.
errorOut(completionKey);
- ReferenceCountUtil.release(toSend);
+ ReferenceCountUtil.release(request);
Review Comment:
Does this also result in the correct behavior when `useV2WireProtocol ==
false`?
It doesn't look consistent how the V3 protocol is currently handled since
there's no retained duplicate and the backing Netty ByteBuf isn't released.
In the case of V3 protocol, the body might consist of
com.google.protobuf.NioByteString instances that wrap the Nio ByteBuffer
instances backed by Netty ByteBuf instances which also control the lifecycle of
the Nio ByteBuffer instances.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]