AOSSIE-Org / AOSSIE-Org/Ell-ena

CRITICAL: Race Condition in generate_ticket_number()

Offen
#52 3 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @g-k-s-03 Auf GitHub ansehen
Vorherrschende Sprache
Dart
Sterne
54
Forks
110
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### 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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.