You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/12/05 01:45:08 UTC

[GitHub] [pulsar] hangc0276 commented on a change in pull request #13134: Fix schedule task memory leak in ManagedLedgerFactoryImpl

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-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org