You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/04/24 07:26:19 UTC
[GitHub] [pulsar] wangjialing218 opened a new pull request, #15292: fix resource group does not report usage
wangjialing218 opened a new pull request, #15292:
URL: https://github.com/apache/pulsar/pull/15292
### Motivation
As described in [PIP 82](https://github.com/apache/pulsar/wiki/PIP-82%3A-Tenant-and-namespace-level-rate-limiting)
> Each broker will publish the current actual usage, as an absolute number, for each of the ResourceGroups that are currently having traffic, and for which the traffic has changed significantly since the last time it was reported (eg: ±10%).
By default setting the threshold is 5%.
But there is some mistake implementation, even when traffic had a large increase, usage report is not trigged.
### Modifications
Fix mistake implementation
### Verifying this change
This change added tests and can be verified as follows:
testNeedToReportLocalUsage()
### Documentation
- [x] `no-need-doc`
only bug fix
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] gaozhangmin merged pull request #15292: [fix][broker] fix resource group does not report usage
Posted by GitBox <gi...@apache.org>.
gaozhangmin merged PR #15292:
URL: https://github.com/apache/pulsar/pull/15292
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] jiazhai commented on a diff in pull request #15292: fix resource group does not report usage
Posted by GitBox <gi...@apache.org>.
jiazhai commented on code in PR #15292:
URL: https://github.com/apache/pulsar/pull/15292#discussion_r857083868
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/resourcegroup/ResourceQuotaCalculatorImplTest.java:
##########
@@ -111,5 +111,15 @@ public void testRQCalcGlobUsedZeroTest() throws PulsarAdminException {
Assert.assertEquals(newQuota, config);
}
+ @Test
+ public void testNeedToReportLocalUsage() {
Review Comment:
Thanks for the fix. Before this fix, this test will failed, right?
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] wangjialing218 commented on a diff in pull request #15292: fix resource group does not report usage
Posted by GitBox <gi...@apache.org>.
wangjialing218 commented on code in PR #15292:
URL: https://github.com/apache/pulsar/pull/15292#discussion_r857086423
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/resourcegroup/ResourceQuotaCalculatorImplTest.java:
##########
@@ -111,5 +111,15 @@ public void testRQCalcGlobUsedZeroTest() throws PulsarAdminException {
Assert.assertEquals(newQuota, config);
}
+ @Test
+ public void testNeedToReportLocalUsage() {
Review Comment:
Yes, before this fix, result of `(diff / currentBytesUsed) * 100` is 0 if diff is 6 and currentBytesUsed is 100
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] wangjialing218 commented on pull request #15292: fix resource group does not report usage
Posted by GitBox <gi...@apache.org>.
wangjialing218 commented on PR #15292:
URL: https://github.com/apache/pulsar/pull/15292#issuecomment-1107804119
/pulsarbot run-failure-checks
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org