pub enum SagaTransactionError {
RollbackOnly,
CommitRejected,
CommitUncertain,
RollbackFailed,
Infrastructure,
}Expand description
业务作用:保留 Saga 本地事务的封闭失败阶段,使 transport 不解析错误文本决定 ACK。
CommitRejected/CommitUncertain/RollbackFailed 均禁止进入有界 DLT 预算:
前者需要原消息重试完成业务,后两者则无法声称数据库已回滚。
Variants§
RollbackOnly
内层失败把事务标记为 rollback-only,最外层已确认回滚。
CommitRejected
数据库明确拒绝 COMMIT,事务未提交但原输入不得 ACK。
CommitUncertain
COMMIT 请求后无法确定是否已持久。
RollbackFailed
物理回滚失败,不能声称本次无副作用。
Infrastructure
事务开始前或执行内核的基础设施故障。
Implementations§
Source§impl SagaTransactionError
impl SagaTransactionError
Sourcepub fn requires_unbounded_redelivery(self) -> bool
pub fn requires_unbounded_redelivery(self) -> bool
业务作用:判断该阶段是否必须保留原输入且不消耗 DLT 预算。
参数说明: 无。
返回:COMMIT 拒绝/不确定或回滚失败返回真;已确认回滚的其他基础故障返回假。
Trait Implementations§
Source§impl Clone for SagaTransactionError
impl Clone for SagaTransactionError
impl Copy for SagaTransactionError
Source§impl Debug for SagaTransactionError
impl Debug for SagaTransactionError
Source§impl Display for SagaTransactionError
impl Display for SagaTransactionError
impl Eq for SagaTransactionError
Source§impl Error for SagaTransactionError
impl Error for SagaTransactionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for SagaTransactionError
impl PartialEq for SagaTransactionError
impl StructuralPartialEq for SagaTransactionError
Auto Trait Implementations§
impl Forget for SagaTransactionError
impl Freeze for SagaTransactionError
impl Move for SagaTransactionError
impl RefUnwindSafe for SagaTransactionError
impl Send for SagaTransactionError
impl Sync for SagaTransactionError
impl Unpin for SagaTransactionError
impl UnsafeUnpin for SagaTransactionError
impl UnwindSafe for SagaTransactionError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more