Skip to content

Commit

Permalink
kv: replace unexpected txn state assertion with error
Browse files Browse the repository at this point in the history
See cockroachdb#37866.

This has been failing in roachtests like cockroachdb#37488. This will make
it easier to debug until the issue is fixed.

Release note: None
  • Loading branch information
nvanbenschoten committed May 26, 2019
1 parent b95c5ed commit 2c3c06b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/kv/txn_coord_sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -908,9 +908,8 @@ func (tc *TxnCoordSender) maybeRejectClientLocked(
return roachpb.NewError(roachpb.NewTransactionRetryWithProtoRefreshError(
abortedErr.Message, tc.mu.txn.ID, newTxn))
}

if tc.mu.txn.Status != roachpb.PENDING {
log.Fatalf(ctx, "unexpected txn state: %s", tc.mu.txn)
return roachpb.NewErrorf("(see issue #37866) unexpected txn state: %s", tc.mu.txn)
}
return nil
}
Expand Down

0 comments on commit 2c3c06b

Please sign in to comment.