Acquiring and Releasing lock on jobs in ACT_RU_JOB table

When job is acquired by job acquisition thread and it puts it in queue which is available for execution to the thread from thread pool. In some scenario the thread from thread pool not able to complete the locked the task, then after that task will be locked and restored to job table (ACT_RU_JOB) which is available or execution for other or same thread.

1. So whether job acquisition thread puts lock on the task in ACT_RU_JOB table or thread from thread pool puts lock on the task in the table?

2. And which thread releases lock on that task, job acquisition thread or thread from thread pool?



As I understand the process, the acquisition thread writes its engine identifier (a GUID) and a timestamp which is current time + lock time to the row in the job table. When the execution thread finishes the job, it deletes the row from the job table.

The timestamp effectively puts a lease on the job. If the execution thread does not complete the job within the lease time, the job becomes available for acquisition once again, either by the same or a different node.



1 Like