Job acquisition under DB-Deadlock

Hi,

we have just experienced a database-deadlock situation caused by improper nested transactions.
What we noticed is that during the database-deadlock the process application got blocked. All Job-Executors (default 3) could not fetch further jobs.

According to The Job Executor | docs.camunda.org
the job can be fetched by a job executor if

it is due, meaning that the value in the DUEDATE_ column is in the past
it is not locked, meaning that the value in the LOCK_EXP_TIME_ column is in the past
its retries have not been depleted, meaning that the value in the RETRIES_ column is greater than zero.

Here is my assumption:
If a DB-Deadlock occurs during a job-execution, then the thread will hang and never returns. The RETRIES_ column and DUEDATE_ column will not be modified.

After LOCK_EXP_TIME_ the job will be marked as available again and can be fetched by the next job-executor. So it will got stuck again due to DB-Deadlock, and so on until all job executors get stuck.

Did I miss something? Is it the expected behavior?

best regards,
Yong

1 Like