gaozhangmin opened a new pull request, #4801:
URL: https://github.com/apache/bookkeeper/pull/4801

   Descriptions of the changes in this PR:
   
   Main Issue: #xyz
   
   ### Motivation
   
   Over-replicated ledger cleanup currently instantiates a metadata bookie 
driver each time the scan-and-compare garbage collector checks for 
over-replicated ledgers. This repeatedly creates metadata client resources 
during GC cycles, which is unnecessary and can add overhead to the cleanup path.
   
   ### Changes
   
   - Reuse a metadata bookie driver and ledger manager factory inside 
`ScanAndCompareGarbageCollector` for over-replicated ledger cleanup.
   - Make `ScanAndCompareGarbageCollector` closeable and release the cached 
metadata driver when `GarbageCollectorThread` shuts down.
   - Keep the existing GC metadata operation rate limiter behavior while 
reusing the metadata driver.
   - Add a focused unit test to verify the metadata driver is reused across 
calls and closed correctly.
   
   > ---
   > In order to uphold a high standard for quality for code contributions, 
Apache BookKeeper runs various precommit
   > checks for pull requests. A pull request can only be merged when it passes 
precommit checks.
   >
   > ---
   > Be sure to do all the following to help us incorporate your contribution
   > quickly and easily:
   >
   > Otherwise:
   >
   > - [ ] Make sure the PR title is formatted like:
   >     `<Issue #>: Description of pull request`
   >     `e.g. Issue 123: Description ...`
   > - [ ] Make sure tests pass via `mvn clean apache-rat:check install 
spotbugs:check`.
   > - [ ] Replace `<Issue #>` in the title with the actual Issue number.
   >
   > ---


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

Reply via email to