#[non_exhaustive]pub enum TransactionError {
Show 25 variants
ManagerMissing {
datasource: String,
},
ParallelInBlock {
step: String,
datasource: String,
},
MulticastInBlock {
step: String,
datasource: String,
},
WireTapInBlock {
step: String,
datasource: String,
},
AsyncInBlock {
step: String,
datasource: String,
},
SedaInBlock {
step: String,
datasource: String,
},
StreamListInBlock {
step: String,
datasource: String,
},
ForeignDatasource {
step: String,
block_datasource: String,
step_datasource: String,
},
UnnamedDatasource {
step: String,
},
NestedBlock {
inner: String,
},
SessionAborted {
datasource: String,
},
AbortedByHandledError {
datasource: String,
},
CommitUncertain {
datasource: String,
},
CommitFailed {
datasource: String,
reason: String,
},
RollbackUncertain {
datasource: String,
},
PoolExhausted {
datasource: String,
max_connections: u32,
waited_ms: u64,
},
Timeout {
datasource: String,
elapsed_ms: u64,
},
Busy {
datasource: String,
},
JoinSessionMissing {
datasource: String,
},
JoinScopeMismatch {
datasource: String,
expected_scope: u64,
found_scope: u64,
},
RuntimeSqlInJoinedStep {
step: String,
},
TransactionControlSql {
step: String,
statement: String,
},
DialectUnprovable {
scheme: String,
},
UnsupportedJoinDialect {
dialect: String,
datasource: String,
},
DynamicTargetUnprovable {
step: String,
},
}Expand description
Typed transaction failures for load-time validation and runtime finalization.
Every variant names the offender (step or statement) and, where one exists,
the datasource, so operators can discriminate programmatically. The variants
map one-to-one onto the sql-transactions requirements named in each doc
comment. #[non_exhaustive] lets slice 2 grow the family without a breaking
change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ManagerMissing
No TransactionManager is registered for the block datasource.
Serves the requirement “Load-time validation is fail-closed and typed” (unknown datasource with no registered TransactionManager) and the requirement “TransactionManager port and registry resolution” (fail closed, named error).
ParallelInBlock
A parallel split reaches a joined sql step inside the block.
Serves the requirement “Load-time validation is fail-closed and typed”.
Fields
MulticastInBlock
A multicast reaches a joined sql step inside the block.
Serves the requirement “Load-time validation is fail-closed and typed”.
Fields
WireTapInBlock
A wire tap reaches a joined sql step inside the block.
Serves the requirement “Load-time validation is fail-closed and typed”.
Fields
AsyncInBlock
An asynchronous producer handoff reaches a joined sql step inside the block.
Serves the requirement “Load-time validation is fail-closed and typed”.
Fields
SedaInBlock
A seda: handoff reaches a joined sql step inside the block.
Serves the requirement “Load-time validation is fail-closed and typed”.
Fields
StreamListInBlock
A sql step produces a StreamList anywhere inside the block.
Rejected unconditionally (no consumer step needs to be present); serves the requirement “Load-time validation is fail-closed and typed”.
Fields
ForeignDatasource
A sql step inside the block targets a different datasource.
Serves the requirement “Load-time validation is fail-closed and typed” (no 2PC across datasources).
Fields
UnnamedDatasource
A sql step inside the block has no named datasource.
Inline db_url cannot join a block-owned transaction; serves the
requirement “Load-time validation is fail-closed and typed”.
NestedBlock
A transacted block is nested inside another one.
Serves the requirement “Load-time validation is fail-closed and typed”.
SessionAborted
Joined SQL was refused because the session is aborted.
Serves the requirement “Handled joined DB errors are rollback-only”: after the database aborted the transaction, no further statement may run.
AbortedByHandledError
The block body returned Ok after a joined DB error was handled.
Serves the requirement “Handled joined DB errors are rollback-only”:
the server may have aborted the transaction, so a commit path must never
report Committed.
CommitUncertain
A COMMIT acknowledgment was lost or unreadable.
Serves the requirement “Cancellation cutoff”: an unacknowledged COMMIT
is reported as uncertain and never as a rollback.
CommitFailed
The database rejected the COMMIT.
Serves the requirement “Cancellation cutoff”: a rejected COMMIT is a
typed failure, never a reported rollback.
Fields
RollbackUncertain
A ROLLBACK could not be acknowledged.
Serves the requirement “Uncertain finalization detaches the connection”:
the connection is discarded and the outcome is Detached.
PoolExhausted
Connection acquisition exhausted the pool within the acquire deadline.
Serves the requirement “Pool exhaustion is bounded and named”.
Fields
Timeout
Block execution exceeded its deadline.
Serves the requirement “Block timeout”.
Fields
Busy
The session’s single execution slot is already held.
Serves the requirement “Busy block session” (at most one concurrent join per session).
JoinSessionMissing
A baked join has no transaction session to join at runtime.
Serves the requirement “Join semantics for sql steps on the block datasource”; the step must fail rather than auto-commit.
JoinScopeMismatch
A baked join resolved to a different transaction scope at runtime.
Serves the requirement “Join semantics for sql steps on the block datasource”; scope membership is lexical, so a mismatch is a hard error.
Fields
RuntimeSqlInJoinedStep
A joined sql step’s SQL comes from a runtime source (header/body/file).
Serves the requirement “Join semantics for sql steps on the block datasource”: a joined step’s SQL is static, route-configured text.
TransactionControlSql
A joined sql step issues a transaction-control or implicit-commit statement.
Serves the requirement “Join semantics for sql steps on the block
datasource” (BEGIN/COMMIT/ROLLBACK/SAVEPOINT and equivalents
inside a joined step are rejected at load).
DialectUnprovable
The loader cannot prove the transaction semantics of a URL scheme.
Serves the requirement “Join semantics for sql steps on the block datasource”: dialect identity comes from the URL scheme, so an unrecognized scheme fails closed.
UnsupportedJoinDialect
The resolved dialect does not support joined transactions in v1.
Serves the requirement “Join semantics for sql steps on the block datasource”: joined steps are PostgreSQL-only in v1.
Fields
DynamicTargetUnprovable
An in-block dynamic routing target was rejected at load.
Serves the requirement “Join semantics for sql steps on the block datasource”: a step whose destination is computed from the exchange (recipient list, routing slip, dynamic router) cannot prove block membership statically, so a transacted block containing one is rejected at load.
Trait Implementations§
Source§impl Clone for TransactionError
impl Clone for TransactionError
Source§impl Debug for TransactionError
impl Debug for TransactionError
Source§impl Display for TransactionError
impl Display for TransactionError
impl Eq for TransactionError
Source§impl Error for TransactionError
impl Error for TransactionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()