⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@sbejaoui
Copy link
Contributor

@sbejaoui sbejaoui commented Jan 21, 2026

BP of #880

based on #874

sbidoul and others added 14 commits January 8, 2026 12:34
This allows creating test job with a long duration for stress testing.
When a SerializationFailure occurs when updating the state of dependent
jobs, the cursor is not usable anymore so the retry failed with `current transaction is aborted`. A savepoint fixes that.
In this commit we cleanly separate the job acquisition (i.e. verifying the job is in the exepected state, marking it started and locking it) from job execution.

We also avoid trying to start the job if it is already locked by using SKIP LOCKED
and exiting early. Indeed in such situations the job is likely already being handled by another worker so there is no point trying to start it, so we exit early
and let it be handled either by the other worker or the dead job requeuer.
Extract the logic to run one job out of the /queue_job/runjob route.
Towards making this logic reusable in other job executors.
Since we are not going to delete records nor modify foreign keys,
we can take a weaker lock.
…rts patches

Otherwise monkey-patches could be added twice when instantiating new test classes.
@OCA-git-bot
Copy link
Contributor

Hi @guewen,
some modules you are maintaining are being modified, check this out!

@sbejaoui sbejaoui marked this pull request as draft January 21, 2026 13:46
This would release the job lock, causing spurious restarts by the dead jobs requeuer.
@sbejaoui sbejaoui force-pushed the 16.0-prevent-commit-in-jobs branch from 0f1bd2d to ba0e8a8 Compare January 23, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants