When executed in sequence, the operations “is Record locked?” and “lock Record” should be done in one single synchronized method (it would become “atomic”).
Currently, 2 users could obtain the lock on the same record if they both start the action at the exact same time, because isRecordLocked can return true for both. This error would be random and would be difficult to reproduce.
When executed in sequence, the operations “is Record locked?” and “lock Record” should be done in one single synchronized method (it would become “atomic”). Currently, 2 users could obtain the lock on the same record if they both start the action at the exact same time, because isRecordLocked can return true for both. This error would be random and would be difficult to reproduce.