You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
allocator: add option to disable lease-count based rebalancing
This commit disables lease-count based rebalancing in the lease queue if
CountBasedRebalanceDisabled is true.
Currently, the lease queue uses `ShouldTransferLease` and `PlanOneChange` to select
a target store for transferring a range lease. Candidate stores are chosen based
on store health, lease preferences, lagging replicas, and I/O load, and the
final target is decided using one of: `FollowTheWorkload`, `LeaseCountConvergence`,
or `LoadConvergence`.
`LeaseCountConvergence` is used in two scenarios:
(1) When `FollowTheWorkload` (`shouldTransferLeaseForAccessLocality`) lacks sufficient
stats or locality info.
(2) `maybeTransferLeaseAwayTarget`: calls into `allocator.TransferLeaseTarget` with
`LeaseCountConvergence` directly.
This commit disables case (1) by returning early in
`shouldTransferLeaseForLeaseCountConvergence` (used in
`Allocator.TransferLeaseTarget` and `allocator.ShouldTransferLease`). Case (2) is
left intact, since it is less common and less likely to interfere with MMA
decisions.
0 commit comments