315157973 commented on code in PR #20537:
URL: https://github.com/apache/pulsar/pull/20537#discussion_r1223722693
##########
pulsar-broker/src/main/java/org/apache/pulsar/common/naming/ConsistentHashingTopicBundleAssigner.java:
##########
@@ -27,10 +27,9 @@ public class ConsistentHashingTopicBundleAssigner implements
TopicBundleAssignme
private NamespaceService namespaceService;
@Override
public NamespaceBundle findBundle(TopicName topicName, NamespaceBundles
namespaceBundles) {
- NamespaceName namespaceName = topicName.getNamespaceObject();
- checkArgument(namespaceName.equals(topicName.getNamespaceObject()));
long hashCode =
namespaceService.getNamespaceBundleFactory().getLongHashCode(topicName.toString());
NamespaceBundle bundle = namespaceBundles.getBundle(hashCode);
+
checkArgument(bundle.getNamespaceObject().equals(topicName.getNamespaceObject()));
Review Comment:
It may cause NPE, we should find a way to be compatible with the previous
logic in other ways
--
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]