BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
175 / 279 · Module 12 — Idempotency and Duplicate Prevention · filtered: code← prev⊞ allnext →

12.15The Query → Create race

Classic bug:

Worker A:
Query C001 → not found

Worker B:
Query C001 → not found

Worker A:
Create C001

Worker B:
Create C001

Result:

2 Accounts

This is why:

Query
then Create

is not equivalent to:

atomic Upsert with unique external ID

Great interview talking point.