Problem
Design an inventory system for a dark store tracking physical stock, customer holds, and shopper picks
- Serialize concurrent reservations per SKU so only one customer claims the last unit
- Reclaim expired basket holds safely without racing against shoppers confirming picks
- Maintain strict consistency for writes while supporting fast availability reads
Key Test Points
- Row-level locking
- Separate reservation table
- Scheduled cleanup job
Spot an issue or have a suggestion?