Demogorgon314 commented on a change in pull request #13975:
URL: https://github.com/apache/pulsar/pull/13975#discussion_r840432470



##########
File path: 
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
##########
@@ -1711,7 +1711,7 @@ public void asyncMarkDelete(final Position position, 
Map<String, Long> propertie
                 long ledgerEntries = 
ledger.getLedgerInfo(markDeletePosition.getLedgerId()).get().getEntries();
                 Long nextValidLedger = 
ledger.getNextValidLedger(ledger.getLastConfirmedEntry().getLedgerId());
                 shouldCursorMoveForward = (markDeletePosition.getEntryId() + 1 
>= ledgerEntries)
-                        && (newPosition.getLedgerId() == nextValidLedger);
+                        && (nextValidLedger != null && 
newPosition.getLedgerId() == nextValidLedger);

Review comment:
       Ah, You're right, I have changed it back now.




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