Skip to content

Conversation

@315157973
Copy link
Contributor

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

@315157973 315157973 self-assigned this Dec 28, 2021
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Dec 28, 2021
@codelipenghui codelipenghui added this to the 2.10.0 milestone Dec 28, 2021
@codelipenghui codelipenghui added doc-required Your PR changes impact docs and you will update later. and removed doc-not-needed Your PR changes do not impact docs labels Jan 21, 2022
@codelipenghui
Copy link
Contributor

@315157973 Since the PR introduced a new metric, I added the doc-required label.

# Conflicts:
#	pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/PrometheusMetricsTest.java
Copy link
Contributor

@Jason918 Jason918 left a 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.

@Anonymitaet
Copy link
Member

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.
Copy link
Contributor

@Jason918 Jason918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@Anonymitaet Anonymitaet added doc-complete Your PR changes impact docs and the related docs have been already added. and removed doc-required Your PR changes impact docs and you will update later. labels Jan 27, 2022
@codelipenghui codelipenghui merged commit 5bb4b75 into apache:master Jan 27, 2022
Nicklee007 pushed a commit to Nicklee007/pulsar that referenced this pull request Apr 20, 2022
### 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.
@mattisonchao mattisonchao added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/branch-2.9 Archived: 2.9 is end of life doc-complete Your PR changes impact docs and the related docs have been already added. release/2.9.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants