Skip to content

Commit

Permalink
Merge pull request tikv#259 from ekexium/allow-rollback-after-commit-…
Browse files Browse the repository at this point in the history
…failure

Allow txn to rollback after commit failed
  • Loading branch information
nrc authored Apr 14, 2021
2 parents 0314d63 + 2baa2a1 commit 1dbbb14
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/transaction/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,9 @@ impl<PdC: PdClient> Transaction<PdC> {
let status = self.status.read().await;
if !matches!(
*status,
TransactionStatus::StartedRollback | TransactionStatus::Active
TransactionStatus::StartedRollback
| TransactionStatus::Active
| TransactionStatus::StartedCommit
) {
return Err(Error::OperationAfterCommitError);
}
Expand Down

0 comments on commit 1dbbb14

Please sign in to comment.