-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix invalid rack name cause bookie join rack failed #13683
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. |
...r-common/src/main/java/org/apache/pulsar/bookie/rackawareness/BookieRackAffinityMapping.java
Outdated
Show resolved
Hide resolved
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdBookies.java
Outdated
Show resolved
Hide resolved
…ckawareness/BookieRackAffinityMapping.java Co-authored-by: lipenghui <penghui@apache.org>
…CmdBookies.java Co-authored-by: lipenghui <penghui@apache.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
* 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 available
Modification
BookieRackAffinityMapping
, and returnnull
to fallback to/default-rack
or/default-region/default-rack
StringIndexOutOfBoundsException
Documentation
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)