Hello,
we deploy our process app into a homogeneous environment. We have ‘asynchronous continuation’ enabled for all of our system tasks per Camunda’s best practices.
Recently, we found that the same job can be executed by more than one Executor thread. Looking at the log below, the thread-1 picked up the job first, and completed the job. But as it tried to update/remove the job in the job table, it had an OptimisticLockingException. We guess because of this failure, another thread-2 was used to pick up the same job and completed the job one more time.
Is this the expected behavior? how can be prevent the thread-2 pick up the same job that is already completed by thread-1?
“thread” : “camundaTaskExecutor-1”,
“applicationName” : “baseWorkflowApp”
“message” : “Service task Publish QC Request to HS completed for business key 2995294”,
**“timestamp” : “2020-03-25T16:34:33.318Z”,
**“thread” : “camundaTaskExecutor-1”,
**“logger” : “org.camunda.bpm.engine.jobexecutor”,
**“message” : “ENGINE-14006 Exception while executing job 7d86a28d-6eb6-11ea-86dc-005056aeee74: OptimisticLockingException. To see the full stacktrace set logging level to DEBUG.”,
{
“timestamp” : “2020-03-25T16:34:33.325Z”,
“thread” : “camundaTaskExecutor-2”,
**“message” : “Service task Publish QC Request to HS started for business key 2995294”,
}
Thank you so much for the help!
Jason