[Concurrency] TICKETS_DB list lacks thread safety for concurrent create/update#2883
[Concurrency] TICKETS_DB list lacks thread safety for concurrent create/update#2883sanrishi wants to merge 1 commit into
Conversation
- Add backend/ticket_store.py with RLock-based dict store - Replace next() iteration and list mutation in create/update_ticket - Remove TICKETS_DB import from backend.models Fixes ritesh-1918#2870
|
Someone is attempting to deploy a commit to the ritesh Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Target
\�ackend/routers/tickets.py: \create_ticket, \update_ticket
\�ackend/ticket_store.py\ (new)
Vector
Thread Pool Exhaustion / Concurrency
Problem
\TICKETS_DB\ was a bare Python list with unsafe iteration and mutation. Concurrent requests could bypass duplicate checks and corrupt data.
Changes
Fixes #2870