Skip to content

Commit 95f22f0

Browse files
committed
kvserverbase: add DisableCountBasedRebalancingIfMMAEnabled
This commit introduces a new cluster setting, `DisableCountBasedRebalancingIfMMAEnabled`, which allows us to disable range-count and lease-count based convergence rebalancing when mma is enabled. These forms of rebalancing can conflict with mma goals and cause thrashing.
1 parent 308bd8a commit 95f22f0

File tree

1 file changed

+10
-0
lines changed
  • pkg/kv/kvserver/kvserverbase

1 file changed

+10
-0
lines changed

pkg/kv/kvserver/kvserverbase/base.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,16 @@ const (
161161
LBRebalancingMultiMetric
162162
)
163163

164+
// DisableCountBasedRebalancingIfMMAEnabled is a setting that controls whether
165+
// to disable replica and lease count based rebalancing if multi-metric
166+
// allocator is enabled.
167+
var DisableCountBasedRebalancingIfMMAEnabled = settings.RegisterBoolSetting(
168+
settings.SystemOnly,
169+
"kv.allocator.disable_count_based_rebalancing_with_mma.enabled",
170+
"whether to disable replica and lease count based rebalancing if multi-metric allocator is enabled",
171+
false,
172+
)
173+
164174
// RangeFeedRefreshInterval is injected from kvserver to avoid import cycles
165175
// when accessed from kvcoord.
166176
var RangeFeedRefreshInterval *settings.DurationSetting

0 commit comments

Comments
 (0)