horizonzy commented on code in PR #5809:
URL: https://github.com/apache/pulsar/pull/5809#discussion_r846710675
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -1790,8 +1790,13 @@ void updateCursor(ManagedCursorImpl cursor, PositionImpl
newPosition) {
}
}
- PositionImpl startReadOperationOnLedger(PositionImpl position) {
- long ledgerId = ledgers.ceilingKey(position.getLedgerId());
+ PositionImpl startReadOperationOnLedger(PositionImpl position, OpReadEntry
opReadEntry) {
+ Long ledgerId = ledgers.ceilingKey(position.getLedgerId());
Review Comment:
The change maybe not fix npe, it will cause new npe problem.
see this pr line_1800. if `ledgerId` is null, unbox will cause npe. And
opReadEntry callback didn't put ctx, the callback process need use it, npe
again.
--
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]