RockteMQ-AI commented on issue #4585: URL: https://github.com/apache/rocketmq-dashboard/issues/4585#issuecomment-5749131125
**Issue Evaluation** Category: `bug` | Status: **Confirmed** The reported issue has been verified against the current codebase at `d50ffecc9d`. **Root Cause:** In `TopicConfigComparisonDrawer.tsx`, the request-generation counter (`requestIdRef`) is only bumped inside `runComparison` (line 128). The three instance-pair-changing paths — source `onChange` (line 211), target `onChange` (line 224), and `swapInstances` (line 147) — only call `setResult(null)` without invalidating the in-flight request. When the async comparison resolves, the guard `requestId === requestIdRef.current` still passes, and the stale result is rendered under the new pair's labels. **Impact:** An operator switching instances during loading sees a drift report belonging to a different pair, and may export it under the wrong filename — potentially as evidence in a change ticket. **Severity:** Medium — data integrity issue in the comparison output, no data loss or crash. **Fix:** Bump `requestIdRef.current` in the source/target `onChange` handlers and `swapInstances` to invalidate in-flight requests when the pair changes. A fix has already been proposed in PR #4586. --- *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]
