Exceptions¶
Every CairnDB exception derives from CairnDBError. The two that
applications routinely handle, LeaseLost and TransactionConflict, are
also exported from the top-level package.
Exception |
Raised when |
What to do |
|---|---|---|
|
a lease write finds the lease fenced, released, or deleted |
discard the outcome; someone else owns the work |
|
a transaction’s read set was written concurrently |
retry the transaction |
|
a revalidate hook rejected an event after a lost race |
surface it as a business-rule violation |
|
a batch could not be committed within |
retry later; check storage health |
|
a projection handler raised, or there was nothing to snapshot |
fix the handler; the projection stays at the previous commit |
|
a backend operation failed (other than a lost precondition) |
retry; check credentials and connectivity |
|
unknown storage type |
fix the configuration |
Exception hierarchy for CairnDB.
- exception cairndb.core.exceptions.CairnDBError[source]¶
Bases:
ExceptionBase exception for all CairnDB errors.
- exception cairndb.core.exceptions.StorageError[source]¶
Bases:
CairnDBErrorErrors related to blob storage operations.
- exception cairndb.core.exceptions.SequenceError[source]¶
Bases:
CairnDBErrorErrors related to sequence number generation or ordering.
- exception cairndb.core.exceptions.ReplayError[source]¶
Bases:
CairnDBErrorErrors during WAL replay operations.
- exception cairndb.core.exceptions.SchemaVersionError[source]¶
Bases:
CairnDBErrorErrors related to schema version mismatches.
- exception cairndb.core.exceptions.CommitError[source]¶
Bases:
CairnDBErrorErrors during the commit protocol (write path).
- exception cairndb.core.exceptions.EventRejectedError[source]¶
Bases:
CommitErrorEvent rejected by the revalidate hook after a lost commit race.
- exception cairndb.core.exceptions.ConfigurationError[source]¶
Bases:
CairnDBErrorErrors related to invalid configuration.
- exception cairndb.core.exceptions.HandlerNotFoundError[source]¶
Bases:
CairnDBErrorEvent handler not found for given event type.
- exception cairndb.core.exceptions.LeaseLost[source]¶
Bases:
CairnDBErrorThe lease was fenced: another holder acquired it (epoch advanced).
The former holder must discard any outcome it has not yet written — writes through a lost lease never reach storage.
- exception cairndb.core.exceptions.TransactionConflict[source]¶
Bases:
CairnDBErrorOptimistic transaction aborted: its read set was written concurrently.