Package com.cockroachlabs.crdb.anomaly
package com.cockroachlabs.crdb.anomaly
Typed, exhaustive modelling of CockroachDB failure modes.
CrdbAnomaly is a sealed hierarchy so
callers can handle every failure kind with a pattern-matching switch
and let the compiler prove exhaustiveness.
-
ClassDescriptionMaps raw
SQLExceptions onto the typedCrdbAnomalyhierarchy and decides retryability, based on SQLSTATE.Signals that a circuit breaker is OPEN and the call was rejected without being attempted.A connection-level failure (SQLSTATE class08), e.g.A typed CockroachDB failure.Unchecked, typed failure that wraps aCrdbAnomaly.Signals that the retry engine gave up after exhausting all attempts.A serialization conflict (SQLSTATE40001, or the deadlock variant40P01).Any failure that does not map to a more specificCrdbAnomaly.