lhotari commented on a change in pull request #10773:
URL: https://github.com/apache/pulsar/pull/10773#discussion_r643379023
##########
File path:
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
##########
@@ -1504,6 +1504,8 @@ public synchronized void updateLedgersIdsComplete(Stat
stat) {
if (existsOp.ledger != null) {
existsOp.close();
existsOp = OpAddEntry.create(existsOp.ml, existsOp.data,
existsOp.getNumberOfMessages(), existsOp.callback, existsOp.ctx);
+ // release the extra retain
+ ReferenceCountUtil.release(existsOp.data);
Review comment:
> Just one question, doesn't existsOp.close release the reference?
No it doesn't.
> why do we need to release extra retain here?
OpAddEntry.create will call .retain , that's the extra retain. I already
tried to clarify that in the comment in the code. Does it need more
clarification?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]