315157973 commented on a change in pull request #13538:
URL: https://github.com/apache/pulsar/pull/13538#discussion_r790143539
##########
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:
`ServerCnx2` is another channel, connections bound to `ServerCnx1` will
not effect connections bound to `ServerCnx2`. `producers.values()` only get the
producers belong to `ServerCnx1`.
So the code path you show will only disable auto read for connections bound
to `ServerCnx1`. Connections bound to `ServerCnx2` can go on producing.
```
Connection (1) have Producer of topic A and B.
Connection (2) have Producer of topic A and C.
```
If Topic A is a multi-partition topic, only some partitions will be
throttled.
--
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]