RockteMQ-AI commented on issue #3040: URL: https://github.com/apache/rocketmq-dashboard/issues/3040#issuecomment-5524742123
**Issue Evaluation** Category: `bug` | Status: **Confirmed** The reported issue has been verified against the current codebase. **Root Cause:** In `DashboardCollectTask.fetchBrokerRuntimeStats()` (line 159), the recursive retry call `fetchBrokerRuntimeStats(brokerAddr, retryTime - 1)` is missing a `return` statement. The return value is discarded, and execution falls through to unconditionally rethrow the original exception on lines 160–161. **Impact:** The retry mechanism is completely non-functional. Any transient failure in `fetchBrokerRuntimeStats` will always propagate to the caller, even if a retry would have succeeded. The existing test `testCollectBroker` inadvertently documents this broken behavior — it stubs a throw-then-succeed pattern but asserts that the exception is thrown. **Severity:** Medium — affects dashboard data collection reliability; transient broker communication failures that should be recoverable become permanent failures. **Suggested Fix:** Add `return` before the recursive call on line 159: ```java return fetchBrokerRuntimeStats(brokerAddr, retryTime - 1); ``` The caller at line 126 already handles `null` (returned when retries are exhausted at `retryTime == 0`) with `if (kvTable == null) continue`. An automated fix proposal can be generated. Reply `/approve` to proceed with PR generation. --- *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]
