AOSSIE-Org / AOSSIE-Org/Ell-ena
CRITICAL: Race Condition in generate_ticket_number()
- Lingua principale
- Dart
- Stelle
- 54
- Fork
- 110
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
### Is there an existing issue for this?
- [x] I have searched the existing issues
### What happened?
I**ssue Overview**
The generate_ticket_number() trigger on the tickets table can generate duplicate ticket numbers when multiple tickets are inserted concurrently. This is a race condition in the current logic.
**Steps to Reproduce**
Insert multiple tickets at the same time (concurrent inserts).
Observe that two or more tickets may get the same ticket_number.
**Expected Behavior**
Each ticket should receive a unique ticket number, even if multiple inserts happen simultaneously.
**Actual Behavior**
Duplicate ticket numbers are generated.
Inserts may fail due to primary key conflicts.
Numbering is inconsistent under concurrent load.
### Record
- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.