In my application, I have configured the asyncExecutorAsyncJobLockTimeInMillis to be 30 minutes. About 99% of the jobs that are executed are below 30 minutes, but there are still some that last longer. As I know, they become “expired” and are picked for execution again.
I have done several tests with jobs that are around 35 minutes. After the 35th minute, the job has been executed successfully. However it is started again and I receive
Unexpected error: JobEntity [id=xxx] was updated by another transaction concurrently.
What I want to do is to force stop the execution of the job on the 30th minute and let the thread that picks expired jobs to execute it again immediately. Is it possible?