casuallc commented on a change in pull request #12396:
URL: https://github.com/apache/pulsar/pull/12396#discussion_r759994837



##########
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:
       My point is :
   - `readEntriesComplete` or `readEntriesFailed` must be called in any case, 
so read event would always receive response.
   - `OpReadEntry` should be recyle in `readEntriesComplete` or 
`readEntriesFailed`.




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