The GitHub Actions job "CI" on rocketmq-dashboard.git/ai/purge-skip-inflight 
has failed.
Run started by GitHub user lizhimins (triggered by lizhimins).

Head commit for run:
4ee8cefd050a0b6ca2706c437f7f6b290e0fb7b3 / lizhimins <[email protected]>
fix(ai): keep the retention purge moving past the conversations it skips

Four review follow-ups on the busy-conversation guard. Skipping a conversation
changed what the purge loop's own bookkeeping means, and three of its 
assumptions
stopped holding:

- The "backlog is gone" test compared the DELETE count with the batch size. A 
full
  page can now yield fewer deletes than batchSize once the busy rows are 
dropped, so
  the pass stopped early and left the rest of the backlog to the next run. 
Compare
  the page size instead: only a short page proves the backlog is exhausted.
- A page whose conversations are ALL mid-run deleted nothing and broke out of 
the
  loop, ending the whole pass on a batch it could not use. Continue instead, 
bounded
  by cleanupMaxBatches. No id cursor: the query has no "after this id" form, 
and the
  case is only reachable while a run is genuinely live, because 
reapOrphanedRuns()
  already terminated every ownerless non-terminal run earlier in the same pass.
- The guard asked the run repository about one conversation at a time, i.e. up 
to
  cleanup-batch-size SELECTs per batch (500 by default). Add
  AiRunRepository#findActiveConversationIds and answer the whole page with one
  DISTINCT over an IN list, the same batching findLatestByConversationIds 
already
  does for the conversation list.
- Cover the two paging fixes: a batch that held one busy conversation must still
  page on, and a batch that was entirely busy must not end the pass. Both fail
  against the previous logic. The busy-skip case now stubs the batch query.

The new hand-written query also gets a case in the H2-backed persistence test, 
which
is what proves it runs against the real schema and returns the busy subset only.

Report URL: 
https://github.com/apache/rocketmq-dashboard/actions/runs/39248027445

With regards,
GitHub Actions via GitBox

Reply via email to