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

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   This is a valid race condition in `useQueueBrowser.handlePull`. The 
`finally` block unconditionally removes the pulling lock 
(`pullingRef.current.delete(key)`), but only the React state update is guarded 
by `requestSeqRef`. When a stale pull completes after a generation change, it 
removes the lock owned by the newer pull.
   
   **Root Cause:** The `finally` block in `handlePull` does not check the 
request generation before deleting from `pullingRef`. A stale completion from 
generation N deletes the lock set by generation N+1, breaking deduplication.
   
   **Impact:** Duplicate concurrent pulls for the same queue key, corrupted 
loading indicators (spinner prematurely removed), and potential duplicate API 
calls to the broker.
   
   **Severity:** Medium — affects UI correctness and can trigger redundant 
broker requests, but does not cause data corruption.
   
   **Proposed fix is correct:** Guard both the `pullingRef` deletion and the 
state update using the existing request generation counter. No API or protocol 
change needed.
   
   A PR will be generated to address this.
   
   ---
   *Automated evaluation by @RockteMQ-AI*


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