kaushik-develop opened a new pull request #11331:
URL: https://github.com/apache/pulsar/pull/11331
* use the new (get*) APIs to pull local usage stats from the broker service
* use both directions (publish/dispatch)
* workaround for regression in subscribe() (see
https://github.com/apache/pulsar/issues/11289)
* handle the case of not-yet-configured quota value on a resource group
* cumulative vs. 'since last reported' stats
* adjust publish rate-limit quote at update, and after new quota
calculations
* rename class RGUsageMTAggrWaitForAllMesgs, so it is picked up in CI runs
<!--
### Contribution Checklist
- Name the pull request in the form "[Issue XYZ][component] Title of the
pull request", where *XYZ* should be replaced by the actual issue number.
Skip *Issue XYZ* if there is no associated github issue for this pull
request.
Skip *component* if you are unsure about which is the best component.
E.g. `[docs] Fix typo in produce method`.
- Fill out the template below to describe the changes contributed by the
pull request. That will give reviewers the context they need to do the review.
- Each pull request should address only one issue, not mix up code from
multiple issues.
- Each commit in the pull request has a meaningful commit message
- Once all items of the checklist are addressed, remove the above text and
this checklist, leaving only the filled out template below.
**(The sections below can be removed for hotfixes of typos)**
-->
*(If this PR fixes a github issue, please add `Fixes #<xyz>`.)*
Fixes #<xyz>
*(or if this PR is one task of a github issue, please add `Master Issue:
#<xyz>` to link to the master issue.)*
Master Issue: #<xyz>
### Motivation
*Explain here the context, and why you're making that change. What is the
problem you're trying to solve.*
### Modifications
*Describe the modifications you've done.*
* use the new (get*) APIs, instead of reading fields to get local usage
stats (both publish and dispatch) from the broker service
* handle the case of not-yet-configured quota value on a resource group
(was throwing exception earlier)
* cumulative vs. 'since last reported' stats; useful in the UTs
* adjust publish rate-limit quote at update, and after new quota
calculations
* rename class RGUsageMTAggrWaitForAllMesgs to
RGUsageMTAggrWaitForAllMesgsTest; the missing "Test" was resulting in this UT
not being picked up in CI runs for "-Dgroups=other" of pulsar-broker
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
*(Please pick either of the following options)*
This change is already covered by existing tests, such as *(please describe
tests)*.
mvn test
-Dtest=org.apache.pulsar.broker.resourcegroup.ResourceGroupServiceTest -pl
pulsar-broker
mvn test
-Dtest=org.apache.pulsar.broker.resourcegroup.ResourceGroupUsageAggregationTest
-pl pulsar-broker
mvn test
-Dtest=org.apache.pulsar.broker.resourcegroup.ResourceQuotaCalculatorImplTest
-pl pulsar-broker
mvn test
-Dtest=org.apache.pulsar.broker.resourcegroup.RGUsageMTAggrWaitForAllMesgsTest
-pl pulsar-broker
### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
- Dependencies (does it add or upgrade a dependency): (no)
- The public API: (no)
- The schema: (no
- The default values of configurations: (no)
- The wire protocol: (no)
- The rest endpoints: (no)
- The admin cli options: (no)
- Anything that affects deployment: (no)
### Documentation
#### For contributor
For this PR, do we need to update docs?
No.
#### For committer
For this PR, do we need to update docs?
- If yes,
- if you update docs in this PR, label this PR with the `doc` label.
- if you plan to update docs later, label this PR with the `doc-required`
label.
- if you need help on updating docs, create a follow-up issue with the
`doc-required` label.
- If no, label this PR with the `no-need-doc` label and explain why.
--
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]