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

   ### Before creating this report
   I searched open and closed issues/PRs for QueueBrowser, pullingRef, queue 
pull guards and deduplication, and inspected #2905, #2933, #4283, #4420, #4424 
and #4481.
   
   ### Bug
   On master 987b748e, useQueueBrowser.handlePull unconditionally executes 
pullingRef.current.delete(key) in finally. Only the subsequent React state 
update is guarded by requestSeqRef.
   
   A queue reload or topic/instance change clears pullingRef and advances the 
generation. A new pull for the same broker/queue key can then start. When the 
old pull settles, its finally removes the NEW pull's lock. Another click is no 
longer deduplicated, although the new pull is still pending. Another queue 
finishing can also synchronize the corrupted set to the UI and prematurely 
remove the pending queue's spinner.
   
   ### Reproduction sequence
   1. Load topic A and start a pull for broker-a / queue 0; keep it pending.
   2. Reload queues (or switch topic/instance), then start a new pull for the 
same queue key; keep it pending.
   3. Resolve or reject the original pull.
   4. Try another pull for the same key: it is incorrectly accepted, although 
step 2 is still pending.
   
   ### Expected behavior and proposed fix
   Stale completion must not remove an in-flight marker owned by the current 
generation. Guard both the ref deletion and the state update using the existing 
request generation. No API or protocol change.
   
   ### Relation to previous work
   #4283 resets spinners when reloading; this defect occurs AFTER that reset, 
when an old request completes while a replacement is active. #2933 concerns 
different queues in one generation; this report concerns the same queue key 
across generations. The locate-specific lock in #4420 does not modify 
handlePull's finally block.
   
   Analysis is AI-assisted. A deterministic regression using deferred API 
promises will be added before changing production code.


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