void-ptr974 commented on PR #4801: URL: https://github.com/apache/bookkeeper/pull/4801#issuecomment-4555318702
Thanks for working on reducing the repeated metadata driver initialization here. The current change does improve reuse within ScanAndCompareGarbageCollector itself, but it still creates a separate GC-owned MetadataBookieDriver rather than reusing the one already created by the bookie server. Could we take a look at whether it’s possible to reuse the server-owned MetadataBookieDriver or LedgerManagerFactory instead? The server already owns those resources and closes them through its lifecycle, so GC could ideally just borrow the factory and create/close only the per-run LedgerUnderreplicationManager. That would avoid creating an extra metadata client while also keeping ownership and close semantics clearer. If wiring the server-owned factory into this path is too invasive, it may also be worth weighing the benefit of caching a separate GC-owned driver against the added lifecycle complexity, especially since the default over-replicated ledger GC interval is relatively long. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
