-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[improve] [broker] Add subscription prefix for internal reader #23044
[improve] [broker] Add subscription prefix for internal reader #23044
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #23044 +/- ##
============================================
- Coverage 73.57% 73.40% -0.17%
- Complexity 32624 33493 +869
============================================
Files 1877 1917 +40
Lines 139502 144067 +4565
Branches 15299 15741 +442
============================================
+ Hits 102638 105752 +3114
- Misses 28908 30190 +1282
- Partials 7956 8125 +169
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
LGTM, do we need a PIP for this ?
@Technoboy- It doesn't change any interface or configurations, and I think we do not need a PIP |
pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/PrometheusMetricsTest.java
Outdated
Show resolved
Hide resolved
03bf9cf
to
1fea1e3
Compare
### Motivation We have many system topics, such as __change_events __transaction_buffer_snapshot __transaction_buffer_snapshot_indexes __transaction_buffer_snapshot_segments transaction_coordinator_assign _transaction_log __transaction_pending_ack In Pulsar Broker, we create an internal reader to fetch messages from those system topics. Due to we do not specify the subscription prefix, the reader will generate a random subscription name for each reader. In PIP-355, we introduced a broker-level metric named pulsar_broker_out_bytes_total, which separate the system subscription traffic bytes and user subscription traffic bytes. Due to the internal readers don't have a subscription prefix, we group the internal reader's traffic bytes into user subscription traffic. ### Modifications In this PR, we introduce a system subscription prefix named __system_reader and group the internal reader's traffic into system subscription traffic bytes in metric pulsar_broker_out_bytes_total.
Fixes #xyz
Main Issue: #xyz
PIP: #xyz
Motivation
We have many system topics, such as
In Pulsar Broker, we create an internal reader to fetch messages from those system topics. Due to we do not specify the subscription prefix, the reader will generate a random subscription name for each reader.
In PIP-355, we introduced a broker-level metric named
pulsar_broker_out_bytes_total
, which separate the system subscription traffic bytes and user subscription traffic bytes. Due to the internal readers don't have a subscription prefix, we group the internal reader's traffic bytes into user subscription traffic.Modifications
In this PR, we introduce a system subscription prefix named
__system_reader
and group the internal reader's traffic into system subscription traffic bytes in metricpulsar_broker_out_bytes_total
.Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: