Fix invalid rack name cause bookie join rack failed - #13683
Conversation
|
Could we add a check for the param |
@gaoran10 Thanks for you review, I added the check on cmdBookie side. |
…ckawareness/BookieRackAffinityMapping.java Co-authored-by: lipenghui <penghui@apache.org>
…CmdBookies.java Co-authored-by: lipenghui <penghui@apache.org>
* Fix invalid rackname cause bookie join rack failed (cherry picked from commit af761e2)
* Fix invalid rackname cause bookie join rack failed (cherry picked from commit af761e2)
|
|
|
I didn't find a way to cherry-pick this cleanly to branch-2.7. I'll move this to 2.7.6. Please open a separate PR for branch-2.7. |
@lhotari I will create another PR for branch-2.7 |
|
Move |
Motivation
When user set rack name to
/or empty string"", it will cause all matched bookies join target rack failed and throw the following exceptionWhich will lead ledger create failed and throw
ManagedLedgerException: Not enough non-faulty bookies availableModification
BookieRackAffinityMapping, and returnnullto fallback to/default-rackor/default-region/default-rackStringIndexOutOfBoundsExceptionDocumentation
Check the box below or label this PR directly (if you have committer privilege).
Need to update docs?
doc-required(If you need help on updating docs, create a doc issue)
no-need-doc(Please explain why)
doc(If this PR contains doc changes)