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.