Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kvclient: properly relax assertion about txn already committed #48246

Merged
merged 1 commit into from
Apr 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions pkg/kv/kvclient/kvcoord/txn_coord_sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -802,11 +802,12 @@ func (tc *TxnCoordSender) updateStateLocked(
// bug. Requests are not supposed to be sent on transactions after they
// are committed.
log.Errorf(ctx, "transaction unexpectedly committed: %s. ba: %s. txn: %s.", pErr, ba, errTxn)
} else if errTxn.Status == roachpb.ABORTED {
// We only expect TransactionAbortedError to carry an aborted txn. In
// particular, the heartbeater doesn't like running when the transaction
// is know to be aborted.
log.Fatalf(ctx, "unexpected error with ABORTED txn: (%T) %s. ba: %s. txn: %s.", pErr.GoError(), pErr, ba, errTxn)
}
// We only expect TransactionAbortedError to carry an aborted txn. In
// particular, the heartbeater doesn't like running when the transaction
// is know to be aborted.
log.Fatalf(ctx, "unexpected error with ABORTED txn: (%T) %s. ba: %s. txn: %s.", pErr.GoError(), pErr, ba, errTxn)
}

tc.mu.txn.Update(errTxn)
Expand Down