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
queue_job: concurrent update exception on job state update #855
On a production instance, I sometimes experience concurrent update exceptions on setting a job to done. This happens for a job which is part of group of N1 jobs, chained with a single job, chained with a second group of N2 jobs.and that job is always the last job of the first group. The jobs of the first and second group are run in parallel.
The exception I get:
ERROR odoodb odoo.sql_db: bad query: b' UPDATE "queue_job"
SET "date_done" = "__tmp"."date_done"::timestamp, "dependencies" = "__tmp"."dependencies"::text, "exec_time" = "__tmp"."exec_time"::double precision, "result" = "__tmp"."result"::text, "retry" = "__tmp"."retry"::int4, "state" = "__tmp"."state"::VARCHAR
FROM (VALUES (274978316, \'2025-12-01 15:48:53.476526\', \'{"depends_on": [], "reverse_depends_on": ["abca0f33-26d2-408d-ae2a-f35f62c12844"]}\', 930.537869, NULL, 3, \'done\')) AS "__tmp"("id", "date_done", "dependencies", "exec_time", "result", "retry", "state")
WHERE "queue_job"."id" = "__tmp"."id"
'
ERROR: could not serialize access due to concurrent update
In this case the abca0f33-26d2-408d-ae2a-f35f62c12844 UUID is the UUID of the single job in the middle of the dependency chain, and 274978316 is the ID of the last job to run in the first group.
This happens on a database running Odoo 18.0, the source code of OCA/queue is up to date.
When I get there, the job restarts. If I stop the instance and restart it, the job finally terminates.
@gurneyalex I could reproduce. I don't think this error can be avoided completely, and there is code to retry around that error. However that code seems ineffective. See #867.
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.
Activity
sbidoul commentedon Jan 2, 2026
@gurneyalex I could reproduce. I don't think this error can be avoided completely, and there is code to retry around that error. However that code seems ineffective. See #867.
sbidoul commentedon Jan 2, 2026
Hm, no, re-reading your error, #867 does not fix it and I reproduced something different.
github-actions commentedon Jul 5, 2026
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.