Jason918 commented on a change in pull request #13538:
URL: https://github.com/apache/pulsar/pull/13538#discussion_r789717130



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
##########
@@ -2477,6 +2478,7 @@ public void startSendOperation(Producer producer, int 
msgSize, int numMessages)
                     
producer.getTopic().isTopicPublishRateExceeded(numMessages, msgSize);
             if (isPreciseTopicPublishRateExceeded) {
                 producer.getTopic().disableCnxAutoRead();
+                recordRateLimitMetrics(producers.values());

Review comment:
       > producer.getTopic().disableCnxAutoRead();
   
   This is going to throttle all the connections with producers of this 
`producer.getTopic()`. 
   We need to `recordRateLimitMetrics` on the topics in these connections too.
   
   For example.
   Connection (1) have Producer of topic A and B.
   Connection (2) have Producer of topic A and C.
   One send request in Connection (1) is causing topic A under throttling. 
   And Topic B and C is also under throttling because they share the same 
connection.
   And Topic C won't be called `increasePublishLimitedTimes` with current code.
   
   Correct me if I miss something.
   
   




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