Skip to content

Commit

Permalink
Remove ledger instance from map by requested id when initialization f…
Browse files Browse the repository at this point in the history
…ails (#15085)
  • Loading branch information
horizonzy committed Apr 8, 2022
1 parent 3304733 commit 954b0cd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ public void operationComplete(ManagedLedgerInfo mlInfo, Stat stat) {
initializeBookKeeper(callback);
}
} else if (isNoSuchLedgerExistsException(rc)) {
log.warn("[{}] Ledger not found: {}", name, ledgers.lastKey());
ledgers.remove(ledgers.lastKey());
log.warn("[{}] Ledger not found: {}", name, id);
ledgers.remove(id);
initializeBookKeeper(callback);
} else {
log.error("[{}] Failed to open ledger {}: {}", name, id, BKException.getMessage(rc));
Expand Down

0 comments on commit 954b0cd

Please sign in to comment.