The GitHub Actions job "CI" on 
rocketmq-dashboard.git/fix/ai-second-stop-terminal-write has failed.
Run started by GitHub user unbridled-41 (triggered by unbridled-41).

Head commit for run:
289e0a7dbedf62a28f3d9d2dd673709344f18f66 / unbridled-41 
<[email protected]>
fix(ai): do not fabricate a terminal state for a run that is already stopping

registry.stop() returns false for two different situations: the run is not
owned by this process (the worker is gone, so the service writes the terminal
state itself) and the run is owned but its abort CAS was already decided (the
worker is stopping and will write it). The service read both as "no owner".

Pressing Stop twice - a second tab, a retried request - therefore took the
detached path while the first stop's worker was still in its SIGTERM grace:
runExecutor.terminate wrote its own run_status row and run-row update at
MAX(seq)+1 and closed every observer, and the worker's buffered final text
then collided on that same sequence (DuplicateKeyException, logged and
dropped), leaving a duplicate terminal row and a phantom empty bubble on
reload.

Distinguish the two cases with the handle the registry already exposes, so a
run this process is stopping is left to its worker.

Tested: AiRunServiceTest (new regression red before the change), the whole
conversation package 202 passed, checkstyle clean.

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

With regards,
GitHub Actions via GitBox

Reply via email to