retryOnVersionConflict()
retryOnVersionConflict<
T>(action,options?):Promise<T>
Defined in: js-api/src/domains.ts:561
Runs [action], retrying on DomainVersionConflictError (for transaction-based
read-modify-write flows — put the fresh read INSIDE [action]); rethrows anything else
and the final conflict. maxRetries counts retries AFTER the initial attempt
(default 5 retries = up to 6 attempts). Retries run immediately, without backoff —
conflicts resolve by re-reading, not waiting; add your own delay for high-contention
hot rows.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
action | () => Promise<T> |
options? | { maxRetries?: number; } |
options.maxRetries? | number |
Returns
Promise<T>