lhotari commented on code in PR #21894:
URL: https://github.com/apache/pulsar/pull/21894#discussion_r1454072022
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/SimpleLoadManagerImpl.java:
##########
@@ -702,7 +702,7 @@ private synchronized void doLoadRanking() {
}
// update metrics
- if (resourceUnit.getResourceId().contains(hostname)) {
+ if (resourceUnit.getResourceId().startsWith(hostname + ":")) {
Review Comment:
A contains match doesn't make sense. Let's say if you have "host1", "host10"
and "host100". The resource id is host:port so that's why ":" is added and
startsWith is used
--
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]