Uh oh!
There was an error while loading. Please reload this page.
[18.0][IMP] queue_job: requeue orphaned jobs - #853
Conversation
OCA-git-bot
commented
Nov 21, 2025
Hi @guewen, |
Uh oh!
There was an error while loading. Please reload this page.
8b82098 to
84a3fcaCompareAnizR
commented
Nov 26, 2025
In deed, we talked about it but I think that it got lost. Thanks for this patch, I'll review it within the week. |
hoangtrann
commented
Dec 10, 2025
@sbidoul are we good to merge? |
sbidoul
commented
Dec 31, 2025
Re-reading this I'm slightly annoyed that it reintroduces a complexity that we had simplified before. I wonder if it would work to add a |
89af958 to
a688fa9Comparehoangtrann
commented
Dec 31, 2025
@sbidoul I've adapted the query to your suggestions and tests are passing! |
OCA-git-bot
commented
Dec 31, 2025
This PR has the |
sbidoul
left a comment
There was a problem hiding this comment.
Thanks! One important fix is needed but I think it looks better like this overall.
I'll need to check the execution plan of the new query to be sure it's efficient.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Execution plan looks like this (with the missing where clause added), with one job started with no lock held, and one enqueued with no lock record. So looks good to me: |
sbidoul
left a comment
There was a problem hiding this comment.
Marking as change requested until the missing where clause is added.
a688fa9 to
f56c8fbComparesbidoul
commented
Jan 2, 2026
Ah no, there is a misunderstanding. What you did was good, but the missing where clause was |
sbidoul
commented
Jan 2, 2026
So like this: |
f56c8fb to
1fcb5c3Comparehoangtrann
commented
Jan 2, 2026
@sbidoul I've reverted the changes and add the WHERE clause |
sbidoul
commented
Jan 2, 2026
/ocabot merge patch |
OCA-git-bot
commented
Jan 2, 2026
On my way to merge this fine PR! |
sbidoul
commented
Jan 2, 2026
Thanks! This version reads even better than before. |
Uh oh!
There was an error while loading. Please reload this page.
OCA-git-bot
commented
Jan 2, 2026
Congratulations, your PR was merged at d52a433. Thanks a lot for contributing to OCA. ❤️ |
This pr add a secondary attempt to requeue "orphaned jobs" where it stucks in enqueued, not yet make it to queue_job_lock and selecting jobs after db initialization also misses it. Even a server restart would not unblock the job.
This is most likely due to server being shutdown or crash during job enqueue. Manually requeue the job on UI make everything running again.