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

   ### Symptom
   
   The producer-connection diagnostics page 
(`web/src/pages/studio/Producer.tsx`) turns three failed requests into empty 
success-shaped UI:
   
   1. When `GET /api/instances` fails, the instance selector is silently 
emptied (`setInstances([])`). The page then looks like an environment without 
any instances — no error, no way back except reloading the browser tab.
   2. When the producer-group selector lookup fails (focus or per-keystroke 
search), the previously loaded options are wiped to an empty selector with no 
toast. The failure reads as "no producer groups exist".
   3. When the topic list refresh fails, the loaded options are wiped from the 
selector (the toast fades after a few seconds, leaving an empty success-shaped 
selector).
   
   ### Root cause
   
   The load handlers `catch` the rejection and `setState` to an empty list — 
reporting a failed read as an empty result. The broker-cluster page got the 
correct treatment in #6348 (persistent "instance list failed to load" text plus 
a retry button, and no data wipe), but this page was not covered by it. The 
codebase's established standard (the consumer page's silent-tick handling and 
#6348) is that a failed read must not be presented as an empty result.
   
   ### Impact
   
   - With a transient backend outage, the operator sees a producer-connection 
page with an empty instance selector that offers no recovery path.
   - A failing producer-group lookup mid-search silently empties the filter the 
operator was composing, which can lead to submitting the query without the 
intended group.
   - A failing topic refresh wipes the topic the operator had picked out of the 
visible options.
   
   ### Fix
   
   - Instance discovery failure: render the same failure text and retry 
affordance the broker-cluster page uses (`instance.listLoadFailed` + 
`common.retry`), keep the selector's error status, and do not empty it.
   - Producer-group lookup failure: keep the previously loaded options and 
toast the failure (`producer.fetchProducerGroupsFailed`, new key).
   - Topic refresh failure: keep the previously loaded options and the existing 
toast.
   
   Three new tests fail against the previous behavior and pass with the fix.
   


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