BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
541 / 1048 · Module 12 — Idempotency and Duplicate Prevention← prev⊞ allnext →

12.12But “check then insert” has a race condition

Suppose two Mule workers receive the same request simultaneously.

Worker A:

Is REQ-123 present?
→ no

Worker B:

Is REQ-123 present?
→ no

Then both process:

duplicate business operation

This is a classic check-then-act race condition.

So merely writing:

if not exists:
    process

is not automatically safe under concurrency.