RockteMQ-AI commented on issue #2738: URL: https://github.com/apache/rocketmq-dashboard/issues/2738#issuecomment-5460258457
**Issue Evaluation** Category: `bug` | Status: **Confirmed** This is a clear unit conversion bug. Apache RocketMQ's `commitLogDiskRatio` returns a value between 0 and 1 (e.g., 0.625 for 62.5% usage), but the Dashboard's `BrokerVO.diskUsage` field is rendered as a percentage directly. The result is that 62.5% disk usage displays as "0.625%". **Root cause:** The Apache runtime provider passes the raw ratio value to `BrokerVO.diskUsage` without multiplying by 100 to convert to percentage points. **Suggested fix:** - In the cluster API layer where `BrokerVO` is constructed, multiply `commitLogDiskRatio` by 100 before assigning to `diskUsage` - Add validation to reject non-finite or negative values from the runtime - Consider adding a unit test that verifies the conversion with known ratio values **Severity:** High — incorrect disk usage display could mislead operators into thinking there is ample disk space when the broker is actually near capacity. --- *Automated evaluation by RockteMQ-AI* -- 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]
