Skip to content

Commit

Permalink
row: remove no longer nil txn check
Browse files Browse the repository at this point in the history
I believe this non-nil txn check is no longer needed as of
8f7f2f4 (which fixed the only known
place where we forgot to set the txn field on the FlowCtx).

Release note: None
  • Loading branch information
yuzefovich committed Aug 16, 2023
1 parent aba50b9 commit 46cebe9
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions pkg/sql/row/kv_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ func newTxnKVFetcher(
return br, nil
}
}

fetcherArgs := newTxnKVFetcherArgs{
return newTxnKVFetcherInternal(newTxnKVFetcherArgs{
sendFn: sendFn,
reverse: reverse,
lockStrength: lockStrength,
Expand All @@ -98,15 +97,9 @@ func newTxnKVFetcher(
forceProductionKVBatchSize: forceProductionKVBatchSize,
kvPairsRead: new(int64),
batchRequestsIssued: &batchRequestsIssued,
}
if txn != nil {
// In most cases, the txn is non-nil; however, in some code paths (e.g.
// when executing EXPLAIN (VEC)) it might be nil, so we need to have
// this check.
fetcherArgs.requestAdmissionHeader = txn.AdmissionHeader()
fetcherArgs.responseAdmissionQ = txn.DB().SQLKVResponseAdmissionQ
}
return newTxnKVFetcherInternal(fetcherArgs)
requestAdmissionHeader: txn.AdmissionHeader(),
responseAdmissionQ: txn.DB().SQLKVResponseAdmissionQ,
})
}

// NewDirectKVBatchFetcher creates a new KVBatchFetcher that uses the
Expand Down

0 comments on commit 46cebe9

Please sign in to comment.