You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "123123213weqw (via GitHub)" <gi...@apache.org> on 2026/10/09 11:49:24 UTC
[PR] fix(ai): stop the retention purge deleting busy chats [rocketmq-dashboard]
123123213weqw opened a new pull request, #5810:
URL: https://github.com/apache/rocketmq-dashboard/pull/5810
## Why
The on-request `AiConversationService.delete` stops a conversation's active run before it removes anything: the run's subprocess is still writing into the workspace and its worker is still writing event rows, so the delete path kills the run first.
The scheduled retention pass had no such check. `purgeExpired() -> deleteCascade()` deleted the events, the runs, the conversation row and the workspace of any conversation past the retention age — including one with a run still in flight. The worker then keeps streaming into a workspace directory that no longer exists, its terminal `runRepository.update` hits a deleted row, and its sink inserts event rows for a conversation nobody can read any more. The two delete paths are twins, and only one of them was guarded.
## What changed
`deleteExpiredConversations` now drops the ids that still have a QUEUED or RUNNING run (`runRepository.findActiveByConversationId`) before cascading. Retention has no mandate to kill an answer the user is watching, so a busy conversation is simply left for a later pass instead of being stopped the way an explicit delete stops it. A partially-skipped batch is smaller than the batch size, so the existing `deleted < batchSize` stop condition already keeps the pass from re-querying the same backlog.
## Validation
Red test first: `retentionShouldSkipAConversationWhoseRunIsStillInFlightTest` fails on `upstream-studio` — the cascade deletes conversations 1 and 2 even though 2 has a RUNNING run — and passes with the fix. Full `AiConversationServiceTest` (22 tests) green.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(ai): stop the retention purge deleting busy chats [rocketmq-dashboard]
Posted by "123123213weqw (via GitHub)" <gi...@apache.org>.
123123213weqw commented on PR #5810:
URL: https://github.com/apache/rocketmq-dashboard/pull/5810#issuecomment-6123355090
@lizhimins Refreshed this branch onto the current `rocketmq-studio` — no conflicts. The red `rmqctl Build (Go)` job was the YAML-numbers renderer test (`TestMessageQueryCompletenessWarningTest` expected unquoted numbers); that was fixed on base by #6056/#6057, and after the merge the full `catalog-verify`/`test-race`/`vet`/`build` chain passes on this branch: `catalog-verify`, `test-race`, `vet` and `build` all green.
One CI note that is not this PR's doing: **Backend Build** is red for every open PR right now — the `binary-license-gate` (`server/pom.xml` → `scripts/legal.py`) fails on the current `rocketmq-studio` HEAD as well, because the spring-ai/swagger-ui/tencentcloud jars carry no embedded LICENSE/COPYING text for the gate to collect.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(ai): stop the retention purge deleting busy chats [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins merged PR #5810:
URL: https://github.com/apache/rocketmq-dashboard/pull/5810
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org