Skip to content

Commit 3610842

Browse files
committed
allocatorimpl: remove CountBasedRebalancingOnlyEnabledByMMA
This commit removes `CountBasedRebalancingOnlyEnabledByMMA`, which was left unused.
1 parent c839b90 commit 3610842

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

pkg/kv/kvserver/allocator/allocatorimpl/allocator.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2818,17 +2818,6 @@ func (a *Allocator) CountBasedRebalancingDisabled() bool {
28182818
return kvserverbase.LoadBasedRebalancingMode.Get(&a.st.SV) == kvserverbase.LBRebalancingMultiMetricOnly
28192819
}
28202820

2821-
// CountBasedRebalancingOnlyEnabledByMMA returns true if count-based rebalancing
2822-
// should be enabled only when mma (multi-metric store rebalancer) allows the
2823-
// change. This is used to prevent thrashing when both multi-metric and
2824-
// count-based rebalancing are enabled and have conflicting goals.
2825-
// TODO(wenyihu6): since we sometimes see even worse thrashing behaviour with
2826-
// this change, should we introduce two modes
2827-
// (mma-count with+without thrashing prevention)?
2828-
func (a *Allocator) CountBasedRebalancingOnlyEnabledByMMA() bool {
2829-
return kvserverbase.LoadBasedRebalancingMode.Get(&a.st.SV) == kvserverbase.LBRebalancingMultiMetricAndCount
2830-
}
2831-
28322821
// ShouldTransferLease returns true if the specified store is overfull in terms
28332822
// of leases with respect to the other stores matching the specified
28342823
// attributes.

pkg/kv/kvserver/mmaintegration/thrashing.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ import (
8787
// passed to IsInConflictWithMMA to determine if a candidate conflicts with
8888
// MMA's goals.
8989
//
90-
// If MMA is disabled, a no-op advisor is returned, which always returns false
91-
// for IsInConflictWithMMA. If MMA is enabled, the advisor is created by
90+
// If mma-count is disabled, a no-op advisor is returned, which always returns
91+
// false for IsInConflictWithMMA. If MMA is enabled, the advisor is created by
9292
// computing the load summary for the provided existing store and candidate set.
9393
//
9494
// Note that MMARebalanceAdvisor should always use the means summary constructed

0 commit comments

Comments
 (0)