[managed-ledger] close bk-client factory gracefully (#4580)
### Motivation User can create tools on bookkeeper using ManagedLedger factory which provides [constructor](https://github.com/apache/pulsar/blob/master/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerFactoryImpl.java#L121) to create ml-factory using self-managed bookkeeper (it's not used by broker). So, in case of self-managed bk-client, ML-Factory couldn't shutdown it gracefully and we see issue: #4573 ### Modification - ML-Factory creates `DefaultBkFactory` to create self-managed bk-client and shutdowns same bk-client while closing the resource.
Showing
想要评论请 注册 或 登录