You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "unbridled-41 (via GitHub)" <gi...@apache.org> on 2026/09/05 05:19:51 UTC

[I] [Studio][Bug] Broker config-diff modal applies stale responses: closed dialog reopens and a slower response overwrites a newer request [rocketmq-dashboard]

unbridled-41 opened a new issue, #3292:
URL: https://github.com/apache/rocketmq-dashboard/issues/3292

   ## Problem
   
   `openBrokerConfigDiff` in `web/src/pages/cluster/index.tsx` applies the `getBrokerConfigDiff` response to `brokerConfigDiffState` unconditionally, with no request generation guard. Two triggers:
   
   1. **Closed dialog reopens:** clicking 配置差异 on a Broker row and then 关闭 before the response arrives lets the pending response re-open the dialog on its own and render the diff.
   2. **Wrong cluster's data:** while cluster A's diff request is in flight, clicking 配置差异 on a cluster B row is not blocked; when A's slower response lands it overwrites the modal with A's title and A's differences, presented as if they were B's. A stale failure also clears the loading state of a newer in-flight request.
   
   ## Evidence / source
   
   - Code inspection of the current `rocketmq-studio` branch (base commit 36126024): the sibling NameServer diff flow is guarded by `nsConfigDiffRequestRef` and has the regression test `does not reopen a closed NameServer config diff when its request finishes`; the Broker diff flow has neither a generation ref nor invalidation in either close handler.
   - Deterministic Vitest reproduction with deferred promises in `ClusterPage.test.tsx` (both tests red on the unfixed source): `does not reopen a closed Broker config diff when its request finishes` and `keeps the requested broker config diff when a slower response finishes last`.
   
   ## Impact
   
   Read-only correctness of the Broker 管理 drift view: an operator can read one cluster's config differences while believing they belong to the requested cluster, and a closed dialog can reappear. No configuration write requests are involved.
   
   ## Expected behavior / acceptance criteria
   
   - Only the current Broker-diff request generation may publish open/loading/result state or error handling.
   - Both close paths and unmount invalidate older requests.
   - Regression coverage for close-before-response and slower-response-overwrites-newer-request; both must fail on the unfixed code.
   
   ## Related work
   
   - Closed #2729 added request generations for the **NameServer** config-diff and connection-test modals; the Broker diff modal was outside that scope and remains unguarded — this issue tracks that remaining instance.
   - Wrong-instance targeting of registry config actions is a separate defect tracked in #3103 (draft PR #3151).
   
   ## PR
   
   Draft PR #3154 (includes the fix and the two regression tests).


-- 
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: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Studio][Bug] Broker config-diff modal applies stale responses: closed dialog reopens and a slower response overwrites a newer request [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #3292:
URL: https://github.com/apache/rocketmq-dashboard/issues/3292#issuecomment-6135185836

   This issue has been automatically closed because there has been no activity for 7 days. If you believe this issue is still relevant, please reopen it with updated information.


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Studio][Bug] Broker config-diff modal applies stale responses: closed dialog reopens and a slower response overwrites a newer request [rocketmq-dashboard]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Studio][Bug] Broker config-diff modal applies stale responses: closed dialog reopens and a slower response overwrites a newer request [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #3292: [Studio][Bug] Broker config-diff modal applies stale responses: closed dialog reopens and a slower response overwrites a newer request
URL: https://github.com/apache/rocketmq-dashboard/issues/3292


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org