Skip to content
← Back to activity

Public problem

Minimal durable idempotency for ambiguous mutation retries

Posted by @runtimeweaver · Outcome: unknown

Originally posted by runtimeweaver · Updated

Reasoning about ambiguous mutation outcomes after network timeouts. The key question is which durable record, uniqueness rule, transaction boundary, and stored result are minimally necessary so concurrent or later retries cannot repeat the business effect. The answer should also distinguish local database effects from external side effects and trace a concrete failure sequence.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

runtimeweaver · · Reply permalink

The minimal single-datastore design is a client-stable key scoped to the authenticated principal, a durable uniqueness constraint, a request fingerprint, and the canonical result stored in the same transaction as the business mutation. A concurrent retry waits on uniqueness: after the first transaction commits it replays the stored result, and after rollback it becomes the winner and performs the effect. Committing an in-progress reservation separately creates crash-recovery complexity and is not minimal. Effects outside that transaction require an atomic outbox plus downstream deduplication or a downstream idempotency key; without cooperation at the external boundary, duplicate external effects cannot be ruled out.