From 2b2c6e3b2fbfebf2cf41910b7f062ef8e0bab7f0 Mon Sep 17 00:00:00 2001 From: Andrei Matei Date: Tue, 5 Jul 2022 16:05:25 -0400 Subject: [PATCH] kvserver/batcheval: remove unused arg This arg used to determine whether reads need to block on lease transfers, but that stopped being the case in ed9c68a60. Release note: None --- pkg/kv/kvserver/batcheval/cmd_lease.go | 5 ----- pkg/kv/kvserver/batcheval/cmd_lease_request.go | 2 +- pkg/kv/kvserver/batcheval/cmd_lease_transfer.go | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/pkg/kv/kvserver/batcheval/cmd_lease.go b/pkg/kv/kvserver/batcheval/cmd_lease.go index c33bb178d311..4ec7b11d996d 100644 --- a/pkg/kv/kvserver/batcheval/cmd_lease.go +++ b/pkg/kv/kvserver/batcheval/cmd_lease.go @@ -41,10 +41,6 @@ func newFailedLeaseTrigger(isTransfer bool) result.Result { // The new lease might be a lease for a range that didn't previously have an // active lease, might be an extension or a lease transfer. // -// isExtension should be set if the lease holder does not change with this -// lease. If it doesn't change, we don't need the application of this lease to -// block reads. -// // TODO(tschottdorf): refactoring what's returned from the trigger here makes // sense to minimize the amount of code intolerant of rolling updates. func evalNewLease( @@ -55,7 +51,6 @@ func evalNewLease( lease roachpb.Lease, prevLease roachpb.Lease, priorReadSum *rspb.ReadSummary, - isExtension bool, isTransfer bool, ) (result.Result, error) { // When returning an error from this method, must always return diff --git a/pkg/kv/kvserver/batcheval/cmd_lease_request.go b/pkg/kv/kvserver/batcheval/cmd_lease_request.go index c5f9b55b9f4c..a896a0adaeaa 100644 --- a/pkg/kv/kvserver/batcheval/cmd_lease_request.go +++ b/pkg/kv/kvserver/batcheval/cmd_lease_request.go @@ -158,5 +158,5 @@ func RequestLease( } return evalNewLease(ctx, cArgs.EvalCtx, readWriter, cArgs.Stats, - newLease, prevLease, priorReadSum, isExtension, false /* isTransfer */) + newLease, prevLease, priorReadSum, false /* isTransfer */) } diff --git a/pkg/kv/kvserver/batcheval/cmd_lease_transfer.go b/pkg/kv/kvserver/batcheval/cmd_lease_transfer.go index 3c75cbfbe27b..a862cf955cf1 100644 --- a/pkg/kv/kvserver/batcheval/cmd_lease_transfer.go +++ b/pkg/kv/kvserver/batcheval/cmd_lease_transfer.go @@ -130,5 +130,5 @@ func TransferLease( log.VEventf(ctx, 2, "lease transfer: prev lease: %+v, new lease: %+v", prevLease, newLease) return evalNewLease(ctx, cArgs.EvalCtx, readWriter, cArgs.Stats, - newLease, prevLease, &priorReadSum, false /* isExtension */, true /* isTransfer */) + newLease, prevLease, &priorReadSum, true /* isTransfer */) }