You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "nodece (via GitHub)" <gi...@apache.org> on 2024/03/25 11:10:53 UTC

[PR] [fix][broker] Fix ResourceGroup report local usage [pulsar]

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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [fix][broker] Fix ResourceGroup report local usage [pulsar]

Posted by "nodece (via GitHub)" <gi...@apache.org>.
nodece merged PR #22340:
URL: https://github.com/apache/pulsar/pull/22340


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


Re: [PR] [fix][broker] Fix ResourceGroup report local usage [pulsar]

Posted by "nodece (via GitHub)" <gi...@apache.org>.
nodece commented on PR #22340:
URL: https://github.com/apache/pulsar/pull/22340#issuecomment-2018050706

   /pulsarbot rerun-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