horizonzy commented on code in PR #4713:
URL: https://github.com/apache/bookkeeper/pull/4713#discussion_r2870413880


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingWriteLacOp.java:
##########
@@ -112,6 +113,8 @@ public void writeLacComplete(int rc, long ledgerId, 
BookieId addr, Object ctx) {
 
         if (receivedResponseSet.isEmpty()){
             completed = true;
+            ReferenceCountUtil.release(toSend);

Review Comment:
   Here we may need to check `completed`, only `completed` is false, then 
trigger callback.
   
   The codes should be
   ```
           if (receivedResponseSet.isEmpty()){
               ReferenceCountUtil.release(toSend);
               toSend = null;
               if (!completed) {
                   completed = true;
                   cb.addLacComplete(lastSeenError, lh, ctx);
               }
           }
   ```



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