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



##########
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:
       Actually, if the managedLedger in `Fenced` or `Closed` state, call 
`asyncClose` just
   
https://github.com/apache/pulsar/blob/ee904063abc8ec90c3c536b28a47a59975175cd4/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java#L1316-L1328
   
   So, should we just call `ManagedLedgerFactoryImpl::close` ?




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