coderzc commented on code in PR #25283:
URL: https://github.com/apache/pulsar/pull/25283#discussion_r2936315655
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -4225,7 +4225,7 @@ public Position getFirstPosition() {
}
if (ledgerId > lastConfirmedEntry.getLedgerId()) {
checkState(ledgers.get(ledgerId).getEntries() == 0);
- ledgerId = lastConfirmedEntry.getLedgerId();
+ return PositionFactory.create(lastConfirmedEntry.getLedgerId(),
lastConfirmedEntry.getEntryId());
Review Comment:
+1. I think this changes the shared semantics of `getFirstPosition()`, and
the fix should stay in the cursor initialization / recovery path instead.
--
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]