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

   ### Motivation
   
   The current implementation of `addDefaultRackBookiesIfMinNumRacksIsEnforced` 
has the following issues:
   
   - **Redundant logic**: The initialization and merging process for collecting 
Bookie nodes on the default rack involves unnecessary data copying and checks.
   - **Potential robustness issue**: There is no null check for the address 
returned by `BookieNode.getAddr()`, which may result in `null` values being 
included in the exclusion set.
   - **Incorrect logging**: The log claims to print only the defaultRack 
Bookies that are being excluded, while it actually prints all the nodes, 
including those already in `excludeBookies`. ```java 
LOG.info("enforceMinNumRacksPerWriteQuorum is enabled, so Excluding bookies of 
defaultRack: {}", bookiesInDefaultRack); ```
   
   
   ### Changes
   
   (Describe: what changes you have made)
   
   > ---
   > 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:
   >
   > If this PR is a BookKeeper Proposal (BP):
   >
   > - [ ] Make sure the PR title is formatted like:
   >     `<BP-#>: Description of bookkeeper proposal`
   >     `e.g. BP-1: 64 bits ledger is support`
   > - [ ] Attach the master issue link in the description of this PR.
   > - [ ] Attach the google doc link if the BP is written in Google Doc.
   >
   > 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: commits-unsubscr...@bookkeeper.apache.org

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

Reply via email to