We are using optimistic locking for our case type. The case type instances are update by Job scheduler and most of times this works fine.
But sometime we saw Database-LockFailure-LockHeldByAnother error message and Job scheduler tried to open and update case intances. Below is sample of error message.
Exception in executing Job[SampleJob]com.pega.platform.executor.jobscheduler.scheduler.JobExecutionException: Job Scheduler [SampleJob] activity [SampleActivity] execution marked as failed with message [Cannot obtain a lock on instance AAA-MyCo-WORK P-97037, as Requestor BHO7NM28D640ZRADZR7UI3OGTA8WFVR23A already has the lock].
In my understanding System-Locks records are not created for optimistic locking and Database-LockFailure-LockHeldByAnother error should not be happened for optimistic locking.
Is my understanding correct?