dlg99 commented on a change in pull request #12071:
URL: https://github.com/apache/pulsar/pull/12071#discussion_r797222317
##########
File path:
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
##########
@@ -320,9 +319,44 @@ public ManagedLedgerImpl(ManagedLedgerFactoryImpl factory,
BookKeeper bookKeeper
}
}
- synchronized void initialize(final ManagedLedgerInitializeLedgerCallback
callback, final Object ctx) {
+ synchronized void initialize(final ManagedLedgerInitializeLedgerCallback
originalCb, final Object ctx) {
log.info("Opening managed ledger {}", name);
+ ManagedLedgerInitializeLedgerCallback callback = new
ManagedLedgerInitializeLedgerCallback() {
+ @Override
+ public void initializeComplete() {
+ if (lastConfirmedEntry != null && lastConfirmedEntry.entryId
!= -1) {
+ // check that ledger used by lastConfirmedEntry actually
exists
+ try {
+
getLedgerMetadata(lastConfirmedEntry.getLedgerId()).get();
Review comment:
fixed
--
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]