Pattern
Race-Prone ID Allocation
race-prone-id-allocation
ID selection and updates behave incorrectly under concurrency because mutations and pre-allocation happen out of order, so range/composite-key assumptions and “pick first N” SQL patterns target the wrong rows. Reproducibility breaks and state becomes corrupted.