Guard bulk rollback against newer jobs
In the bulk endpoint, an overlapping reindex for the same document can enqueue a fresh job after this request's safety check but before this failed insert rolls the document back. Because the rollback is filtered only by id/owner_id, it can restore the old failed status/counts over a document that now has a pending or processing job from the other request; guard the rollback on the document still being in the state this request wrote, or perform the per-document queue mutation atomically with job insertion.
Useful? React with 👍 / 👎.
Originally posted by @chatgpt-codex-connector[bot] in #146 (comment)
In the bulk endpoint, an overlapping reindex for the same document can enqueue a fresh job after this request's safety check but before this failed insert rolls the document back. Because the rollback is filtered only by
id/owner_id, it can restore the old failed status/counts over a document that now has a pending or processing job from the other request; guard the rollback on the document still being in the state this request wrote, or perform the per-document queue mutation atomically with job insertion.Useful? React with 👍 / 👎.
Originally posted by @chatgpt-codex-connector[bot] in #146 (comment)