Expand description
Handle execution of database operations and transactions.
Modules§
- hooks
- Commit hooks for executing custom logic before and after transaction commits.
Structs§
- Bisect
Outcomes - The result of a completed search: one outcome per input item, plus what it cost.
- Bisect
Search - Drives a bisect over
nitems: which range to probe next, and what each verdict means for the ranges still outstanding. - DbOp
- Default return type of the derived EsRepo::begin_op().
- DbOp
With Time - Equivileant of
DbOpjust that the time is guaranteed to be cached. - Hook
Slot - Where a released
SavepointOp’s staged commit hooks fold into. - OpWith
Time - Wrapper that guarantees time is available, borrowing the underlying operation.
- Savepoint
Op - An
AtomicOperationscoped to a databaseSAVEPOINTinside a parentDbOpor anotherSavepointOp. - Transient
Limit Exceeded - The transient allowance ran out: the same range kept failing on contention.
- Transient
Policy - Which probe failures are transient, and how many re-probes they may buy.
Enums§
- Bisect
Budget - How many probes a bisect may spend before giving up on the ranges it has not yet resolved.
- Item
Outcome - One input item’s resolution. Positionally aligned with the input slice.
- Probe
Verdict - What a probe over one range turned out to be.
Constants§
- DEFAULT_
MAX_ TRANSIENT_ RETRIES - How many times a transiently-failed range may be re-probed before the search is abandoned.
Traits§
- Atomic
Operation - Trait to signify we can make multiple consistent database roundtrips.
- Atomic
Operation With Time - Batch
Isolation - Batch isolation for every
AtomicOperation. - Savepoint
Operation - Savepoints for every
AtomicOperation, derived rather than hand-written.
Functions§
- is_
retryable_ conflict retryable_conflict_codeas a predicate.- retryable_
conflict_ code - The Postgres sqlstate of a failure that says nothing about the statement
that hit it, or
None.