You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stopping a reindex in its first seconds is ignored and leaves the run stuck as Running #35182
If someone stops the Search Indexing application in the first few seconds of a run, while the reindex is still being set up, the stop is not honored:
The reindex still runs. A few seconds after the stop, the server picks the job up again and indexes everything the user asked to stop.
The run's status goes back to Running and never reaches a final state. It shows as Running until the next reindex starts.
In Collate, Admin Ops treats a Running app as busy. So after this happens, every new reindex request is refused with a 409, and the Admin Ops job that tracked the stopped run stays Running for up to an hour. This is what has kept Collate CI red on main since 9 October (AdminOpsApiIT.testCancelReindexJobMarksFailed and testReindexJobEndsWhenItsRunIsStopped).
Expected behaviour
A stop is honored however early it arrives: nothing is indexed after it, and the run ends as Stopped.
Acceptance criteria
Stopping a run during its setup ends it as Stopped, and it stays Stopped.
No entity is indexed for that run after the stop.
A new reindex can be started right after.
How to reproduce
Trigger SearchIndexingApplication, then call POST /v1/apps/stop/SearchIndexingApplication about one second later, before Reindexing job started appears in the server log. GET /v1/apps/name/SearchIndexingApplication/runs/latest shows stopped briefly, then running, and never ends. The server log shows Restored appRunRecord to running a few seconds after the stop.
Activity