When person X and person Y enter their details at the same time, both users end up receiving the same registration number due to a duplication issue. The registration number is being generated twice, which should not happen. I suspect this might be caused by a concurrency issue in the logic that generates or assigns the registration numbers. Ideally, each user should receive a unique registration number, even if they register simultaneously. How can I fix this issue and ensure uniqueness in the registration numbers?
Mohammad Ashik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3