Aias00 opened a new issue, #4366:
URL: https://github.com/apache/rocketmq-dashboard/issues/4366

   ## Problem
   
   The Studio Producer page clears producer-group suggestions when the selected 
RocketMQ instance changes, but it does not invalidate an in-flight 
producer-group lookup from the previous instance.
   
   `loadProducerGroups` captures the old `selectedInstanceId` and accepts its 
response when its request id still equals `producerGroupRequestIdRef.current`. 
`handleTopicChange` increments that request generation, while 
`handleInstanceChange` only clears the visible list. A delayed response from 
instance A can therefore repopulate the AutoComplete after the operator has 
switched to instance B.
   
   ## Impact
   
   The page can show producer groups belonging to the previous instance. An 
operator may select a stale group and run diagnostics in the wrong context, or 
see suggestions that do not exist on the currently selected instance.
   
   This is distinct from #4168 and its follow-up PRs, which guard producer 
**connection results** when a Topic changes. This issue concerns the 
producer-group suggestion request across an **instance** change.
   
   ## Design
   
   - Increment `producerGroupRequestIdRef` whenever the selected instance 
changes, before clearing suggestions.
   - Keep the current Topic-change invalidation behavior.
   - Do not cancel or change the API contract; a late response is simply 
ignored through the existing request-generation guard.
   - Add a deterministic frontend regression using a deferred instance-A group 
request, switch to instance B, then resolve the old request and verify the 
stale group never appears.
   
   ## Acceptance criteria
   
   - A producer-group response started for a previous instance cannot update 
the current suggestions.
   - Instance change still clears selected Topic, producer group, connection 
rows and summary.
   - Producer-group discovery continues to work after selecting a Topic on the 
new instance.
   - Focused tests, frontend build, lint and formatting checks pass.
   
   ## Scope
   
   Frontend-only request ownership fix. No backend or API behavior changes.
   


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