-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Add publishRateLimitedTimes to topic metrics #13538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@315157973 Since the PR introduced a new metric, I added the doc-required label. |
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
Outdated
Show resolved
Hide resolved
# Conflicts: # pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/PrometheusMetricsTest.java
Jason918
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add rate limit count in org.apache.pulsar.broker.service.ServerCnx#disableCnxAutoRead.
This is the place rate limit actual take effects.
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
Outdated
Show resolved
Hide resolved
|
Discussed w/ @315157973, from the doc side, he will add the newly added metrics to https://pulsar.apache.org/docs/en/next/reference-metrics/#topic-metrics. |
…other Topic use the same connections are inaccurate.
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
Outdated
Show resolved
Hide resolved
Jason918
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
### Motivation Broker limits the rate of publishing messages by setting `channel.setAutoRead(false)`. But no exception is returned to the client, or any log is printed, which makes it very difficult for user to troubleshoot the problem. When the Producer is limited, the client will send timeout and the connection will be closed (Broker no longer process the Client's heartbeat request, because autoRead=false). We don't know if there is a problem with network or the rate is limited or other reasons.
Motivation
Broker limits the rate of publishing messages by setting
channel.setAutoRead(false). But no exception is returned to the client, or any log is printed, which makes it very difficult for user to troubleshoot the problem. When the Producer is limited, the client will send timeout and the connection will be closed (Broker no longer process the Client's heartbeat request, because autoRead=false). We don't know if there is a problem with network or the rate is limited or other reasons.Modifications
Add publishRateLimitedTimes to topic metrics
Documentation
no-need-doc