X-LightYear commented on issue #7226:
URL: 
https://github.com/apache/rocketmq-dashboard/issues/7226#issuecomment-6289565883

   ## Implementation update
   
   The corresponding fix is available in [PR 
#7227](https://github.com/apache/rocketmq-dashboard/pull/7227).
   
   ### Root cause
   
   The retention sweep applied SQL `LIMIT` before excluding conversations with 
`QUEUED` or `RUNNING` runs. If the oldest page consisted entirely of busy 
conversations, every batch selected the same busy IDs and deleted nothing. 
Later idle expired conversations were therefore skipped even when deletion 
capacity remained.
   
   ### Fix
   
   The candidate query now excludes conversations with active runs before 
applying the batch limit. The existing service-level active-run recheck remains 
in place to protect against the selection-to-deletion race.
   
   This preserves:
   
   - the existing oldest-first cleanup order
   - the configured batch ceiling
   - protection for live conversations and their children
   - bounded cleanup work per pass
   
   ### Validation
   
   - deterministic regression covers both `QUEUED` and `RUNNING` busy prefixes
   - batch size of 1 reproduces the original starvation behavior
   - post-fix runs retain busy conversations, runs, and events
   - later idle conversations and children are deleted
   - AI conversation package: 602 tests passed, 3 skipped
   - persistence integration suite: 10 tests passed
   - Checkstyle and `git diff --check` passed
   
   The fix addresses busy-page starvation only; the existing admission-race 
behavior is 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