merlimat commented on code in PR #4780:
URL: https://github.com/apache/bookkeeper/pull/4780#discussion_r3210003731
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java:
##########
@@ -710,26 +690,21 @@ void writeLac(final long ledgerId, final byte[]
masterKey, final long lac, ByteB
ctx, ledgerId, this));
// Build the request
- BKPacketHeader.Builder headerBuilder = BKPacketHeader.newBuilder()
+ Request writeLacRequest = new Request();
+ writeLacRequest.setHeader()
.setVersion(ProtocolVersion.VERSION_THREE)
.setOperation(OperationType.WRITE_LAC)
.setTxnId(txnId);
- ByteString body = ByteStringUtil.byteBufListToByteString(toSend);
- toSend.retain();
- Runnable cleanupActionFailedBeforeWrite = toSend::release;
- Runnable cleanupActionAfterWrite = cleanupActionFailedBeforeWrite;
- WriteLacRequest.Builder writeLacBuilder = WriteLacRequest.newBuilder()
+ ByteBuf body = ByteBufList.coalesce(toSend);
Review Comment:
Yes, let me fix that
--
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]