Skip to content

Commit 53eb27d

Browse files
committed
fix: allow txn to rollback after commit failed
Signed-off-by: ekexium <[email protected]>
1 parent 4870985 commit 53eb27d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/transaction/transaction.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,9 @@ impl<PdC: PdClient> Transaction<PdC> {
538538
let status = self.status.read().await;
539539
if !matches!(
540540
*status,
541-
TransactionStatus::StartedRollback | TransactionStatus::Active
541+
TransactionStatus::StartedRollback
542+
| TransactionStatus::Active
543+
| TransactionStatus::StartedCommit
542544
) {
543545
return Err(Error::OperationAfterCommitError);
544546
}

0 commit comments

Comments
 (0)