From 2c3c06ba15b975c85f1a8db5d4020ff8da7b3f29 Mon Sep 17 00:00:00 2001 From: Nathan VanBenschoten Date: Sun, 26 May 2019 16:32:57 -0400 Subject: [PATCH] kv: replace unexpected txn state assertion with error See #37866. This has been failing in roachtests like #37488. This will make it easier to debug until the issue is fixed. Release note: None --- pkg/kv/txn_coord_sender.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/kv/txn_coord_sender.go b/pkg/kv/txn_coord_sender.go index 86abfc195e38..392cd8c484b3 100644 --- a/pkg/kv/txn_coord_sender.go +++ b/pkg/kv/txn_coord_sender.go @@ -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 }