tisonkun commented on code in PR #20096: URL: https://github.com/apache/pulsar/pull/20096#discussion_r1167084512
########## managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java: ########## @@ -3066,34 +3068,38 @@ boolean shouldCloseLedger(LedgerHandle lh) { } } - void switchToNewLedger(final LedgerHandle lh, final VoidCallback callback) { + void switchToNewLedger(@Nonnull LedgerHandle lh, VoidCallback callback) { + requireNonNull(lh, "LedgerHandle should not be null"); + if (log.isDebugEnabled()) { log.debug("[{}] Switching cursor {} to ledger {}", ledger.getName(), name, lh.getId()); } + persistPositionMetaStore(lh.getId(), lastMarkDeleteEntry.newPosition, lastMarkDeleteEntry.properties, - new MetaStoreCallback<Void>() { Review Comment: Reverted. -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org