nodece opened a new pull request, #22340:
URL: https://github.com/apache/pulsar/pull/22340

   ### Motivation
   
   1. 
`org.apache.pulsar.broker.resourcegroup.ResourceQuotaCalculator#needToReportLocalUsage`
 determine whether sending the current report of local usage can be suppressed 
(to reduce network communication), which returns true, we need to report the 
local usage to resourcegroup topic and reset some status, but now we always 
reset that, please see 
https://github.com/apache/pulsar/blob/branch-3.0/pulsar-broker/src/main/java/org/apache/pulsar/broker/resourcegroup/ResourceGroup.java#L452-L457
   
   2. `maxIntervalForSuppressingReportsMSecs` value is in milliseconds, not 
seconds, so the local usage is always reported.
   
   
   ### Modifications
   
   - Reset the `usedLocallySinceLastReport`, `totalUsedLocally`, 
`lastResourceUsageFillTimeMSecsSinceEpoch` after `needToReportLocalUsage` 
returns true.
   - Covert `maxIntervalForSuppressingReportsMSecs` to milliseconds from 
seconds.
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->


-- 
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]

Reply via email to