lhotari commented on a change in pull request #13134:
URL: https://github.com/apache/pulsar/pull/13134#discussion_r762517215



##########
File path: 
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerFactoryImpl.java
##########
@@ -353,6 +353,17 @@ public void asyncOpen(final String name, final 
ManagedLedgerConfig config, final
                         log.warn("[{}] Attempted to open ledger in {} state. 
Removing from the map to recreate it",
                                 name, l.getState());
                         ledgers.remove(name, existingFuture);
+                        l.asyncClose(new CloseCallback() {

Review comment:
       Good point. I guess calling asyncClose is sufficient. However there  
seems to be a bug in the asyncClose method when the ledger is fenced. The 
method call to cancel the scheduled tasks is missing.




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


Reply via email to