ReadonlypendingStale-pending takeover threshold (ms) — see D1IdempotencyStoreOptions.pendingTtlMs.
Return a completed record for key, or undefined while absent or pending.
Finalize a key's record. token is the lease returned by an atomic
reserve(): when supplied, the store finalizes ONLY if the key still
belongs to that lease. A stale holder whose lease was taken over cannot
overwrite the new result. Omit the token on the legacy get/put path,
which upserts
unconditionally (same-isolate protection only).
Optionaltoken: stringDrop a pending reservation after a failed execute — failures stay
retryable. token is the lease from reserve(): when supplied, only the
matching lease's pending row is dropped, so a stale holder cannot delete
a newer claim.
Optionaltoken: stringAtomically reserve a key, replay a completed result, or report contention.
Idempotency store with an atomic claim — the shape durable, cross-isolate implementations must take: reserve() is a compare-and-set, so two isolates racing one key resolve to exactly one 'reserved' winner. The connector wrapper prefers this path whenever a store implements it.