Skip to content

Commit

Permalink
kvserver: clarify a call into Allocator.TransferLeaseTarget
Browse files Browse the repository at this point in the history
Previously, it wasn't very clear how a call into `maybeTransferLeaseAway` would
find a lease transfer target. This commit makes a small effort to make this
obvious.

Release note: None
  • Loading branch information
aayushshah15 committed Sep 24, 2022
1 parent 57f084c commit efe32e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/kv/kvserver/replicate_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,11 @@ func (rq *replicateQueue) maybeTransferLeaseAway(
desc,
conf,
transferLeaseOptions{
goal: leaseCountConvergence,
dryRun: dryRun,
// NB: This option means that the allocator is asked to not consider the
// current replica in its set of potential candidates.
checkTransferLeaseSource: false,
},
)
return transferred == transferOK, err
Expand Down

0 comments on commit efe32e6

Please sign in to comment.