You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/01/11 06:59:05 UTC
[GitHub] [pulsar] codelipenghui commented on a change in pull request #13683: Fix invalid rack name cause bookie join rack failed
codelipenghui commented on a change in pull request #13683:
URL: https://github.com/apache/pulsar/pull/13683#discussion_r781800568
##########
File path: pulsar-broker-common/src/main/java/org/apache/pulsar/bookie/rackawareness/BookieRackAffinityMapping.java
##########
@@ -158,7 +159,9 @@ private String getRack(String bookieAddress) {
}
}
- if (bi != null) {
+ if (bi != null
+ && !Strings.isNullOrEmpty(bi.getRack())
+ && !bi.getRack().equals("/")) {
Review comment:
```suggestion
if (bi != null
&& !Strings.isNullOrEmpty(bi.getRack())
&& !bi.getRack().trim().equals("/")) {
```
##########
File path: pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdBookies.java
##########
@@ -89,12 +93,21 @@ void run() throws Exception {
@Override
void run() throws Exception {
+ checkArgument(!Strings.isNullOrEmpty(bookieRack) && !bookieRack.equals(PATH_SEPARATOR),
Review comment:
```suggestion
checkArgument(!Strings.isNullOrEmpty(bookieRack) && !bookieRack.trim().equals(PATH_SEPARATOR),
```
--
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-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org