Skip to content

Commit

Permalink
kvserver/batcheval: remove unused arg
Browse files Browse the repository at this point in the history
This arg used to determine whether reads need to block on lease
transfers, but that stopped being the case in ed9c68a.

Release note: None
  • Loading branch information
andreimatei committed Jul 5, 2022
1 parent c897707 commit 2b2c6e3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions pkg/kv/kvserver/batcheval/cmd_lease.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/kv/kvserver/batcheval/cmd_lease_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 */)
}
2 changes: 1 addition & 1 deletion pkg/kv/kvserver/batcheval/cmd_lease_transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 */)
}

0 comments on commit 2b2c6e3

Please sign in to comment.