Diagram explorer

Recovering the export on either side of commit

The caller sees the same silence in two different database states. Follow the original request key through rollback, a committed-but-lost reply or a conflicting retry.

Relationship map
01 One intended export02 Validate and scope03 Claim or find K04 Uncommitted writes05 Cut A · before commit06 Cut B · after commit07 Repeat with the same key08 Compare the input09 Same 202 receipt10 409 on changed intent
01 / 10Request contract

One intended export

Before sending, the client stores key K for snapshot 7 and the requested format. It keeps the key across timeouts for this same operation.

02 / 10Request contract

Validate and scope

Authorize the tenant and snapshot, apply defaults and normalize the validated fields. Trace IDs are transport metadata and do not change the export identity.

03 / 10Request contract

Claim or find K

The unique tenant, operation and key identify the receipt. A concurrent insert may wait for the first transaction. A bounded wait can end in a retry with the same K.

04 / 10Crash windows

Uncommitted writes

Stage the request receipt, conditional credit debit, job for the immutable input and outbox dispatch intent inside the same database transaction.

05 / 10Crash windows

Cut A · before commit

After restart the uncommitted request, debit, job and outbox are absent. A valid retry can win admission and perform all four writes together.

06 / 10Crash windows

Cut B · after commit

All four changes exist before the HTTP receipt reaches the client. If the reply is lost, the caller cannot infer whether a credit has been spent.

07 / 10Crash windows

Repeat with the same key

An unknown commit outcome takes the same recovery route as a missing reply. Reconnect, check permission again and look up the original intent.

08 / 10Observable outcomes

Compare the input

For an existing key, read the winning row and compare the normalized fingerprint. Under the described Read Committed design, the subsequent lookup gets a new statement snapshot.

09 / 10Observable outcomes

Same 202 receipt

Return the recorded job ID and stable status URL. Recovery adds no new job, debit or outbox entry. A separate status read reports later progress.

10 / 10Observable outcomes

409 on changed intent

The same scoped key with a different snapshot or format conflicts with the accepted request. The original durable state and remaining credit are preserved.