poorbarcode commented on code in PR #4289:
URL: https://github.com/apache/bookkeeper/pull/4289#discussion_r1566927462


##########
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?
   
   No memory leak when `useV2WireProtocol` is `false`, but the error 
`io.netty.util.IllegalReferenceCountException: refCnt: 0, increment: 1` 
described in the Motivation will also occur.



-- 
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]

Reply via email to