RockteMQ-AI commented on issue #3292:
URL: 
https://github.com/apache/rocketmq-dashboard/issues/3292#issuecomment-5549852263

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed** | Severity: **Medium**
   
   Verified against `rocketmq-studio` branch (base commit 3612602).
   
   **Root Cause:** `openBrokerConfigDiff` 
(`web/src/pages/cluster/index.tsx:360`) applies the `getBrokerConfigDiff` 
response to `brokerConfigDiffState` unconditionally — no request generation 
guard, no invalidation on close. Two defects:
   
   1. **Dialog reopens after close:** The `onCancel`/close handlers (lines 997, 
1002) set `open: false` but do not invalidate the in-flight request. When the 
pending response arrives, it calls `setBrokerConfigDiffState({open: true, 
...})`, re-opening the dialog autonomously.
   2. **Stale data overwrite:** While cluster A's diff request is in-flight, 
clicking cluster B's button starts a second request. If A's slower response 
lands last, it overwrites the modal with A's title and differences, presented 
as B's.
   
   The sibling NameServer diff flow is correctly guarded by 
`nsConfigDiffRequestRef` (line 172) — the Broker diff flow was missed when 
#2729 added those guards.
   
   **Impact:** Read-only correctness of the Broker management drift view. An 
operator could read one cluster's config differences while believing they 
belong to another. No configuration writes are involved.
   
   **Assessment:** Well-documented with correct code analysis, two 
deterministic Vitest reproductions, and accurate related-work references. Draft 
PR #3154 addresses this with the fix and both regression tests.
   
   ---
   *Automated evaluation by github-manager*


-- 
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]

Reply via email to