codelipenghui commented on a change in pull request #12606:
URL: https://github.com/apache/pulsar/pull/12606#discussion_r742903285



##########
File path: 
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
##########
@@ -699,10 +699,14 @@ public void asyncAddEntry(ByteBuf buffer, 
AddEntryCallback callback, Object ctx)
             log.debug("[{}] asyncAddEntry size={} state={}", name, 
buffer.readableBytes(), state);
         }
 
-        OpAddEntry addOperation = OpAddEntry.create(this, buffer, callback, 
ctx);
+        // retain buffer in this thread
+        buffer.retain();

Review comment:
       Is it necessary to retain the buffer in this thread?




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