Demogorgon314 commented on code in PR #16714:
URL: https://github.com/apache/pulsar/pull/16714#discussion_r926790062
##########
pulsar-broker/src/main/java/org/apache/pulsar/common/naming/NamespaceBundleFactory.java:
##########
@@ -242,11 +242,11 @@ public NamespaceBundle
getBundleWithHighestThroughput(NamespaceName nsName) {
if (loadManager instanceof ModularLoadManagerWrapper) {
NamespaceBundles bundles = getBundles(nsName);
double maxMsgThroughput = -1;
- NamespaceBundle bundleWithHighestThroughput = null;
+ NamespaceBundle bundleWithHighestThroughput =
bundles.getBundles().get(0);
Review Comment:
If the bundle don't have any connected topic, the check
`bundleData.getTopics() > 0` will never pass, so the
`bundleWithHighestThroughput ` is null.
--
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]