IARC-CSU / CanReg5

CanReg5 is a multi user, multi platform, open source tool to input, store, check and analyse cancer registry data.
http://www.iacr.com.fr/CanReg5
GNU General Public License v3.0
24 stars 13 forks source link

C213: Change “lock Record” to do “check and lock” in the same operation #112

Closed infotel4iarc closed 2 years ago

infotel4iarc commented 2 years ago

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.

fbinfotel commented 2 years ago

The branch is https://github.com/infotel4iarc/CanReg5/tree/feature/C213

Here are the point that were done :