@@ -68,18 +68,18 @@ const (
68
68
minRangeRebalanceThreshold = 2
69
69
70
70
// DefaultReplicaIOOverloadThreshold is used to avoid allocating to stores with an
71
- // IO overload score greater than what's set. This is typically used in
72
- // conjunction with IOOverloadMeanThreshold below.
71
+ // IO overload score greater than or equal to what's set. This is typically
72
+ // used in conjunction with IOOverloadMeanThreshold below.
73
73
DefaultReplicaIOOverloadThreshold = 0.3
74
74
75
75
// DefaultLeaseIOOverloadThreshold is used to block lease transfers to stores
76
- // with an IO overload score greater than this threshold. This is typically
77
- // used in conjunction with IOOverloadMeanThreshold below.
76
+ // with an IO overload score greater than or equal to this threshold. This
77
+ // is typically used in conjunction with IOOverloadMeanThreshold below.
78
78
DefaultLeaseIOOverloadThreshold = 0.3
79
79
80
80
// DefaultLeaseIOOverloadShedThreshold is used to shed leases from stores
81
- // with an IO overload score greater than the this threshold. This is
82
- // typically used in conjunction with IOOverloadMeanThreshold below.
81
+ // with an IO overload score greater than or equal to this threshold. This
82
+ // is typically used in conjunction with IOOverloadMeanThreshold below.
83
83
DefaultLeaseIOOverloadShedThreshold = 0.4
84
84
85
85
// IOOverloadMeanThreshold is the percentage above the mean after which a
@@ -142,14 +142,14 @@ var RangeRebalanceThreshold = settings.RegisterFloatSetting(
142
142
settings .WithPublic ,
143
143
)
144
144
145
- // ReplicaIOOverloadThreshold is the maximum IO overload score of a candidate
146
- // store before being excluded as a candidate for rebalancing replicas or
145
+ // ReplicaIOOverloadThreshold is the IO overload score at or above which a
146
+ // candidate store is excluded as a candidate for rebalancing replicas or
147
147
// allocation. This is only acted upon if ReplicaIOOverloadThreshold is set to
148
148
// `block_all` or `block_rebalance_to`.
149
149
var ReplicaIOOverloadThreshold = settings .RegisterFloatSetting (
150
150
settings .SystemOnly ,
151
151
"kv.allocator.replica_io_overload_threshold" ,
152
- "the maximum store io overload before the enforcement defined by " +
152
+ "the threshold store io overload at or above which the enforcement defined by " +
153
153
"`kv.allocator.io_overload_threshold_enforce` is taken on a store " +
154
154
"for allocation decisions" ,
155
155
DefaultReplicaIOOverloadThreshold ,
@@ -182,28 +182,28 @@ var ReplicaIOOverloadThresholdEnforcement = settings.RegisterEnumSetting(
182
182
},
183
183
)
184
184
185
- // LeaseIOOverloadThreshold is the maximum IO overload score a store may have
186
- // before being excluded as a candidate for lease transfers. This threshold is
187
- // only acted upon if LeaseIOOverloadThresholdEnforcement is set to 'shed' or
185
+ // LeaseIOOverloadThreshold is the IO overload score at or above which a store
186
+ // will be excluded as a candidate for lease transfers. This threshold is only
187
+ // acted upon if LeaseIOOverloadThresholdEnforcement is set to 'shed' or
188
188
// `block`.
189
189
var LeaseIOOverloadThreshold = settings .RegisterFloatSetting (
190
190
settings .SystemOnly ,
191
191
"kv.allocator.lease_io_overload_threshold" ,
192
- "a store will not receive new leases when its IO overload score is above this " +
192
+ "a store will not receive new leases when its IO overload score is at or above this " +
193
193
"value and `kv.allocator.io_overload_threshold` is " +
194
194
"`shed` or `block_transfer_to`" ,
195
195
DefaultLeaseIOOverloadThreshold ,
196
196
)
197
197
198
- // LeaseIOOverloadShedThreshold is the maximum IO overload score the current
199
- // leaseholder store for a range may have before shedding its leases and no
200
- // longer receiving new leases. This threhsold is acted upon only If
198
+ // LeaseIOOverloadShedThreshold is the IO overload score at or above which the
199
+ // current leaseholder store for a range will shed its leases and no longer
200
+ // receive new leases. This threshold is acted upon only if
201
201
// LeaseIOOverloadThresholdEnforcement is set to 'shed'.
202
202
var LeaseIOOverloadShedThreshold = settings .RegisterFloatSetting (
203
203
settings .SystemOnly ,
204
204
"kv.allocator.lease_shed_io_overload_threshold" ,
205
205
"a store will shed its leases and receive no new leases when its " +
206
- "IO overload score is above this value and " +
206
+ "IO overload score is at or above this value and " +
207
207
"`kv.allocator.lease_io_overload_threshold_enforcement` is `shed`" ,
208
208
DefaultLeaseIOOverloadShedThreshold ,
209
209
)
@@ -236,12 +236,16 @@ var LeaseIOOverloadThresholdEnforcement = settings.RegisterEnumSetting(
236
236
// {ReplicaIOOverloadThreshold, ReplicaIOOverloadThresholdEnforcement}, when
237
237
// transferring replicas.
238
238
//
239
- // TODO(sumeer): change to DefaultLeaseIOOverloadShedThreshold after discussion.
239
+ // The default is set to DefaultLeaseIOOverloadShedThreshold, which is greater
240
+ // than DefaultLeaseIOOverloadThreshold and DefaultReplicaIOOverloadThreshold.
241
+ // Hence, if those settings are left at their defaults, and the enforcement
242
+ // enum settings are at their default, a store with an unhealthy disk will
243
+ // shed leases, and have no new leases or replicas transferred to it.
240
244
var DiskUnhealthyIOOverloadScore = settings .RegisterFloatSetting (
241
245
settings .SystemOnly ,
242
246
"kv.allocator.disk_unhealthy_io_overload_score" ,
243
247
"the IO overload score to assign to a store when its disk is unhealthy" ,
244
- 0 )
248
+ DefaultLeaseIOOverloadShedThreshold )
245
249
246
250
// maxDiskUtilizationThreshold controls the point at which the store cedes
247
251
// having room for new replicas. If the fraction used of a store descriptor
0 commit comments