Jason918 commented on a change in pull request #13538:
URL: https://github.com/apache/pulsar/pull/13538#discussion_r792394850
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
##########
@@ -1710,7 +1710,10 @@ private void refreshTopicPublishRate() {
public void checkBrokerPublishThrottlingRate() {
brokerPublishRateLimiter.checkPublishRate();
if (brokerPublishRateLimiter.isPublishRateExceeded()) {
- forEachTopic(topic -> ((AbstractTopic)
topic).disableProducerRead());
+ forEachTopic(topic -> {
+ topic.increasePublishLimitedTimes();
Review comment:
This is duplicated count. Line 1715 will trigger
`ServerCnx#disableCnxAutoRead`.
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
##########
@@ -2496,6 +2497,7 @@ public void startSendOperation(Producer producer, int
msgSize, int numMessages)
// When the quota of pending send requests is reached, stop
reading from socket to cause backpressure on
// client connection, possibly shared between multiple producers
ctx.channel().config().setAutoRead(false);
+ recordRateLimitMetrics(producers.values());
Review comment:
`producers.values()` makes a copy values.
See `org.apache.pulsar.common.util.collections.ConcurrentLongHashMap#values`.
--
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]