12/09/2026
Backend Note ⚙️
Transactions prevent partial updates.
They don’t automatically prevent race conditions.
If two requests read the same balance at the same time,
both will pass validation and try to deduct stock.
Never validate and modify shared state in application memory.
Push atomic constraints directly to the database.
Check-then-act is a bug waiting to happen.