Playbook

Debugging Idempotency Bugs

How to debug duplicate writes when clients, webhooks, or workers retry after ambiguous failures.

Pattern

A request or event can be delivered more than once, but the service performs the side effect each time.

warningSymptoms

  • arrow_rightDuplicate orders or invoices
  • arrow_rightRetries after timeouts create new resources
  • arrow_rightWebhook replay changes state twice

searchWhere to look

  • arrow_rightIdempotency key parsing
  • arrow_rightProcessed-event store
  • arrow_rightSide-effect ordering
  • arrow_rightReplay response storage

buildCommon fixes

  • arrow_rightPersist idempotency keys before side effects
  • arrow_rightDeduplicate provider event ids
  • arrow_rightReplay the first durable result
  • arrow_rightAdd duplicate-delivery tests

Practice challenges

No ready practice incident is mapped yet.