lightzhao commented on a change in pull request #13558:
URL: https://github.com/apache/pulsar/pull/13558#discussion_r776564119
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
##########
@@ -883,7 +883,7 @@ private void updatePublishDispatcher(Optional<Policies>
optPolicies) {
//topic-level policy is not set, try to use namespace-level rate policy
final String clusterName =
brokerService.pulsar().getConfiguration().getClusterName();
- final PublishRate publishRate = policies.publishMaxMessageRate != null
+ final PublishRate publishRate = policies !=null &&
policies.publishMaxMessageRate != null
Review comment:
There is no NPE case in the production environment,But I see that the
logic of the code below is judged to be null.
[// attach the resource-group level rate limiters, if set
String rgName = policies != null && policies.resource_group_name !=
null
? policies.resource_group_name
: 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]