Skip to content

Commit

Permalink
Merge #38790
Browse files Browse the repository at this point in the history
38790: roachpb: remove TransactionStatusError_REASON_TXN_NOT_FOUND r=tbg a=nvanbenschoten

This was last used in v2.1. v19.2 nodes don't need to worry about it.

Release note: None

Co-authored-by: Nathan VanBenschoten <[email protected]>
  • Loading branch information
craig[bot] and nvanbenschoten committed Jul 10, 2019
2 parents c42f094 + 71186f0 commit bf2075c
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 bf2075c

Please sign in to comment.