-
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] Decouple pulsar_storage_backlog_age_seconds metric with backlogQuota check #23619
Conversation
…from backlogQuota policy
8b8ffc8
to
e2a102f
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #23619 +/- ##
============================================
+ Coverage 73.57% 74.35% +0.78%
- Complexity 32624 34488 +1864
============================================
Files 1877 1944 +67
Lines 139502 147239 +7737
Branches 15299 16248 +949
============================================
+ Hits 102638 109486 +6848
- Misses 28908 29309 +401
- Partials 7956 8444 +488
Flags with carried forward coverage won't be shown. Click here to find out more.
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
Show resolved
Hide resolved
// If backlog quota by time is not set | ||
if (backlogQuotaLimitInSecond <= 0) { | ||
return CompletableFuture.completedFuture(false); | ||
if (!(ledger.getCursors() instanceof ManagedCursorContainer managedCursorContainer)) { |
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.
Since the ledger.getCursors()
exposes the API by an interface, shouldn’t let the implementation to decide the result?
…with backlogQuota check (apache#23619) (cherry picked from commit 963be2c) (cherry picked from commit 12eccd2)
…with backlogQuota check (apache#23619) (cherry picked from commit 963be2c) (cherry picked from commit 12eccd2)
Motivation
#21709 introduced a valuable metric: pulsar_storage_backlog_age_seconds, but it only updates when a topic has the message_age backlog quota policy.
Modifications
backlogQuotaChecker
is also used to periodically update thepulsar_storage_backlog_age_seconds
metric, regardless of whether the topic has a backlog quota policy.Verifying this change
backlogsAgeMetricsNoPreciseWithoutBacklogQuota
andbacklogsAgeMetricsPreciseWithoutBacklogQuota
to cover this change.Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: