You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "noob-se7en (via GitHub)" <gi...@apache.org> on 2026/07/09 07:27:52 UTC

[PR] Add server-level consumption rate limit observability metrics and fix byte-mode overflow [pinot]

noob-se7en opened a new pull request, #18942:
URL: https://github.com/apache/pinot/pull/18942

   ## Description
   
   Server-level realtime consumption rate limiting had two observability gaps:
   
   1. The server-wide quota utilization was published through the per-table `CONSUMPTION_QUOTA_UTILIZATION` gauge keyed by the meter name `realtimeRowsConsumed`. Being a server-wide value, the JMX/Prometheus exporters map it onto a misleading, per-table-shaped series that server-level dashboards cannot match.
   2. `QuotaUtilizationTracker`/`AsyncMetricEmitter` aggregated the per-minute unit count in an `int` and cast the `LongAdder` sum to `int` in `emit()`. In byte-based throttling mode the per-minute byte sum for a busy server exceeds `Integer.MAX_VALUE` (~35.8 MB/s sustained over the 60s window), overflowing to a negative utilization.
   
   There was also no metric exposing the configured rate limit, so a dashboard could not show the cap or whether limiting is enabled.
   
   ## Changes
   
   - Add `SERVER_CONSUMPTION_QUOTA_UTILIZATION` (global gauge) and emit the server-level utilization through it instead of the per-table gauge.
   - Add `SERVER_CONSUMPTION_RATE_LIMIT` (global) and `CONSUMPTION_RATE_LIMIT` (per-table) exposing the configured caps on limiter setup/config change (server gauge is set to `-1` when disabled; server utilization is reset to `0` on disable so the two server gauges stay consistent).
   - Widen the per-minute aggregate and the `emit()` read to `long` to fix the byte-mode overflow.
   
   ## Backward-incompatible metric change
   
   The server-wide quota utilization moves from `consumptionQuotaUtilization{table="realtimeRowsConsumed"}` to the new global gauge `serverConsumptionQuotaUtilization`. Dashboards/alerts keyed on the old series should switch. Please apply the `backward-incompat` label.
   
   ## Testing
   
   `RealtimeConsumptionRateManagerTest` — 11/11 pass, covering the byte-overflow regression (tracker + `emit()`), server-vs-partition gauge routing, and configured-cap emission on create/update/disable paths.
   


-- 
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@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] Add server-level consumption rate limit observability metrics and fix byte-mode overflow [pinot]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #18942:
URL: https://github.com/apache/pinot/pull/18942#issuecomment-4923576066

   ## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/18942?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `94.11765%` with `2 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 56.94%. Comparing base ([`f29b359`](https://app.codecov.io/gh/apache/pinot/commit/f29b359b8464b8d8f54aefa92e9fec37544f94e7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`438ed87`](https://app.codecov.io/gh/apache/pinot/commit/438ed872752ab569e3ad742ebd915794e3b83c57?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/pinot/pull/18942?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...nager/realtime/RealtimeConsumptionRateManager.java](https://app.codecov.io/gh/apache/pinot/pull/18942?src=pr&el=tree&filepath=pinot-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fcore%2Fdata%2Fmanager%2Frealtime%2FRealtimeConsumptionRateManager.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9kYXRhL21hbmFnZXIvcmVhbHRpbWUvUmVhbHRpbWVDb25zdW1wdGlvblJhdGVNYW5hZ2VyLmphdmE=) | 93.54% | [0 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/pinot/pull/18942?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   > :exclamation:  There is a different number of reports uploaded between BASE (f29b359) and HEAD (438ed87). Click for more details.
   > 
   > <details><summary>HEAD has 16 uploads less than BASE</summary>
   >
   >| Flag | BASE (f29b359) | HEAD (438ed87) |
   >|------|------|------|
   >|java-21|5|1|
   >|unittests|2|1|
   >|temurin|5|1|
   >|integration|3|0|
   >|integration1|1|0|
   >|unittests2|1|0|
   >|custom-integration1|1|0|
   >|integration2|1|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #18942      +/-   ##
   ============================================
   - Coverage     64.93%   56.94%   -7.99%     
   + Complexity     1347        1    -1346     
   ============================================
     Files          3395     2605     -790     
     Lines        212533   153739   -58794     
     Branches      33515    25075    -8440     
   ============================================
   - Hits         138012    87550   -50462     
   + Misses        63379    58710    -4669     
   + Partials      11142     7479    -3663     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/pinot/pull/18942/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [custom-integration1](https://app.codecov.io/gh/apache/pinot/pull/18942/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration](https://app.codecov.io/gh/apache/pinot/pull/18942/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration1](https://app.codecov.io/gh/apache/pinot/pull/18942/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration2](https://app.codecov.io/gh/apache/pinot/pull/18942/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [java-21](https://app.codecov.io/gh/apache/pinot/pull/18942/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.94% <94.11%> (-7.99%)` | :arrow_down: |
   | [temurin](https://app.codecov.io/gh/apache/pinot/pull/18942/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.94% <94.11%> (-7.99%)` | :arrow_down: |
   | [unittests](https://app.codecov.io/gh/apache/pinot/pull/18942/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.94% <94.11%> (-7.99%)` | :arrow_down: |
   | [unittests1](https://app.codecov.io/gh/apache/pinot/pull/18942/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.94% <94.11%> (-0.02%)` | :arrow_down: |
   | [unittests2](https://app.codecov.io/gh/apache/pinot/pull/18942/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/pinot/pull/18942?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] Add server-level consumption rate limit observability metrics and fix byte-mode overflow [pinot]

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


-- 
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@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] Add server-level consumption rate limit observability metrics and fix byte-mode overflow [pinot]

Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 commented on PR #18942:
URL: https://github.com/apache/pinot/pull/18942#issuecomment-4971392542

   Docs follow-up: pinot-contrib/pinot-docs#914 https://github.com/pinot-contrib/pinot-docs/pull/914


-- 
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@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org