tju-yxq opened a new issue, #2593:
URL: https://github.com/apache/rocketmq-dashboard/issues/2593

   ## Problem
   
   The Client Connections page uses an independent local `cancelled` flag for 
each request:
   
   ```ts
   let cancelled = false;
   ...
   return () => {
     cancelled = true;
   };
   ```
   
   This protects against unmount, but it does not sequence concurrent requests. 
A slow earlier response can still resolve after a newer request has started and 
overwrite the newer data. The page has two such paths:
   
   - registry discovery can overwrite newer cluster options after a retry;
   - the connection query can overwrite newer connections after switching 
NameServers.
   
   The connection path also does not reliably enter loading state for each new 
request; loading is mainly set by the NameServer change handler and registry 
retry, which leaves retries and endpoint changes driven by registry discovery 
inconsistent.
   
   ## Expected behavior
   
   - Sequence registry discovery requests with a request generation.
   - Sequence connection requests with a request generation.
   - Ignore stale success, error, and loading updates for both request types.
   - Enter loading state when a connection request starts, without violating 
the React lint rule against synchronous setState in effect bodies.
   - Keep registry retry and NameServer switching behavior unchanged.
   
   ## Verification scope
   
   Tests should cover:
   - a stale connection response after switching NameServers;
   - a stale registry response after retrying discovery;
   - existing retry, failure, statistics, export, and dialog behavior remaining 
unchanged.


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