lifepuzzlefun commented on code in PR #20537:
URL: https://github.com/apache/pulsar/pull/20537#discussion_r1228226848


##########
pulsar-broker/src/main/java/org/apache/pulsar/common/naming/NamespaceBundles.java:
##########
@@ -66,7 +66,7 @@ public NamespaceBundles(NamespaceName nsname, 
NamespaceBundleFactory factory,
         this.factory = Objects.requireNonNull(factory);
         this.localPolicies = localPolicies;
         checkArgument(partitions.length > 0, "Can't create bundles w/o 
partition boundaries");
-
+        this.topicBundleAssignmentStrategy = 
TopicBundleAssignmentFactory.create(factory.getPulsar());

Review Comment:
   hi, can this stragegy field move to BundleFactory ?  In heavy traffic 
cluster, it seems a lot NamespaceBundles will be created. When init this object 
`TopicBundleAssignmentFactory.create` will use java reflection multi times 
which will is rather slow. if this object is just stateless, maybe put in the 
BundleFactory is more suitable



-- 
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]

Reply via email to