Jason918 commented on a change in pull request #12396:
URL: https://github.com/apache/pulsar/pull/12396#discussion_r759910077
##########
File path:
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpReadEntry.java
##########
@@ -58,6 +57,11 @@ public static OpReadEntry create(ManagedCursorImpl cursor,
PositionImpl readPosi
}
op.maxPosition = maxPosition;
op.ctx = ctx;
+ PositionImpl position =
cursor.ledger.startReadOperationOnLedger(readPositionRef, op);
+ if (position == null) {
+ return null;
Review comment:
We can recycle this OpReadEntry if we return null.
--
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]