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.

  • Class
    Description
    Maps raw SQLExceptions onto the typed CrdbAnomaly hierarchy 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 class 08), e.g.
    A typed CockroachDB failure.
    Unchecked, typed failure that wraps a CrdbAnomaly.
    Signals that the retry engine gave up after exhausting all attempts.
    A serialization conflict (SQLSTATE 40001, or the deadlock variant 40P01).
    Any failure that does not map to a more specific CrdbAnomaly.