yyqdbngt opened a new pull request, #2930: URL: https://github.com/apache/rocketmq-dashboard/pull/2930
## Summary - clamp `LiteTopicSession.getConsumptionProgress()` to the valid 0–100 percentage range - clamp `LiteTopicQuota.getUsageRate()` and `getSessionUsageRate()` to the unit interval - add regression coverage for counter drift above and below the valid range ## Why The provider's total/consumed counters and the current/max quota counters drift independently between polls. A transient mismatch (consumed ahead of total, or a current count above the configured maximum) leaked negative or over-100% ratios straight into the view objects, where gauges render them. The sibling quota helpers already defend against this (`isQuotaExceeded` requires a positive maximum, `getRemainingQuota` clamps at zero); this brings the ratio getters in line with that behavior. ## Testing - `cd server && mvn -q -Dtest=LiteTopicSessionTest,LiteTopicQuotaTest test` — all tests pass, including the new `consumptionProgressShouldClampCounterDriftIntoTheValidRange` and `usageRatesShouldClampCountDriftIntoTheUnitInterval` -- 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]
