Skip to content

Commit

Permalink
kv: remove unnecessary check
Browse files Browse the repository at this point in the history
PR cockroachdb#44507 has left an unnecessary check in place. The check tolerates
requests with the WriteTooOld flag set for leaf txn, even though the
same commit makes sure that leaves reset that flag.

Release note: None
  • Loading branch information
andreimatei committed Feb 14, 2020
1 parent 0469f81 commit d5bca4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kv/txn_interceptor_span_refresher.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (sr *txnSpanRefresher) SendLocked(
func (sr *txnSpanRefresher) sendLockedWithRefreshAttempts(
ctx context.Context, ba roachpb.BatchRequest, maxRefreshAttempts int,
) (*roachpb.BatchResponse, *roachpb.Error) {
if ba.Txn.WriteTooOld && sr.canAutoRetry {
if ba.Txn.WriteTooOld {
// The WriteTooOld flag is not supposed to be set on requests. It's only set
// by the server and it's terminated by this interceptor on the client.
log.Fatalf(ctx, "unexpected WriteTooOld request. ba: %s (txn: %s)",
Expand Down

0 comments on commit d5bca4a

Please sign in to comment.