Skip to content

Commit

Permalink
roachpb: remove TransactionStatusError_REASON_TXN_NOT_FOUND
Browse files Browse the repository at this point in the history
This was last used in v2.1. v19.2 nodes don't need to worry about it.

Release note: None
  • Loading branch information
nvanbenschoten committed Jul 10, 2019
1 parent 813b014 commit 71186f0
Show file tree
Hide file tree
Showing 5 changed files with 228 additions and 249 deletions.
2 changes: 0 additions & 2 deletions c-deps/libroach/protos/roachpb/errors.pb.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions c-deps/libroach/protos/roachpb/errors.pb.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions pkg/kv/txn_interceptor_heartbeater.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,17 +331,6 @@ func (h *txnHeartbeater) heartbeat(ctx context.Context) bool {
if pErr != nil {
log.VEventf(ctx, 2, "heartbeat failed: %s", pErr)

// If the heartbeat request arrived to find a missing transaction record
// then we ignore the error. This is possible if the heartbeat loop was
// started before a BeginTxn request succeeds because of ambiguity in the
// first write request's response.
//
// TODO(nvanbenschoten): Remove this in 2.3.
if tse, ok := pErr.GetDetail().(*roachpb.TransactionStatusError); ok &&
tse.Reason == roachpb.TransactionStatusError_REASON_TXN_NOT_FOUND {
return true
}

// We need to be prepared here to handle the case of a
// TransactionAbortedError with no transaction proto in it.
//
Expand Down
Loading

0 comments on commit 71186f0

Please sign in to comment.