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
This commit disables range-count based rebalancing in the replicate queue if
CountBasedRebalanceDisabled is true.
Currently, when selecting a rebalance target, the allocator constructs an
equivalence class for each existing replica. This class includes all stores that
are not worse than the existing replica in terms of constraint conformance,
diversity score, and disk fullness. At this stage, range count convergence is
not yet considered. The allocator then evaluates each candidate set using
`ScorerOptions`, which populates candidates' attributes such as balance score,
convergence score, and range count with respect to the equivalence class, and
determines the best candidate within each equivalence class.
To disable range count–based rebalancing, this commit introduces a new scorer
option, `BaseScorerOptionsNoConvergence`. This scorer assigns the same score to
all stores, effectively treating candidates within the same equivalence class
the same. It is only used when both MMA and
`DisableCountBasedRebalancingIfMMAEnabled` are enabled.
Note that this new scorer option is applied only in
`ReplicaPlanner.considerRebalance` and `ReplicaPlanner.ShouldPlanChange`. As a
result, range-count based rebalancing is disabled during rebalancing, but range
count is still considered when allocator adds new replicas (such as
`AllocateVoter`), choosing a rebalance target in the old store rebalancer
(`StoreRebalancer.applyRangeRebalance`), and when removing replicas
(`Allocator.RemoveVoter`).
0 commit comments