@@ -68,18 +68,18 @@ const (
6868 minRangeRebalanceThreshold = 2
6969
7070 // 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.
7373 DefaultReplicaIOOverloadThreshold = 0.3
7474
7575 // 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.
7878 DefaultLeaseIOOverloadThreshold = 0.3
7979
8080 // 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.
8383 DefaultLeaseIOOverloadShedThreshold = 0.4
8484
8585 // IOOverloadMeanThreshold is the percentage above the mean after which a
@@ -142,14 +142,14 @@ var RangeRebalanceThreshold = settings.RegisterFloatSetting(
142142 settings .WithPublic ,
143143)
144144
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
147147// allocation. This is only acted upon if ReplicaIOOverloadThreshold is set to
148148// `block_all` or `block_rebalance_to`.
149149var ReplicaIOOverloadThreshold = settings .RegisterFloatSetting (
150150 settings .SystemOnly ,
151151 "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 " +
153153 "`kv.allocator.io_overload_threshold_enforce` is taken on a store " +
154154 "for allocation decisions" ,
155155 DefaultReplicaIOOverloadThreshold ,
@@ -182,28 +182,28 @@ var ReplicaIOOverloadThresholdEnforcement = settings.RegisterEnumSetting(
182182 },
183183)
184184
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
188188// `block`.
189189var LeaseIOOverloadThreshold = settings .RegisterFloatSetting (
190190 settings .SystemOnly ,
191191 "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 " +
193193 "value and `kv.allocator.io_overload_threshold` is " +
194194 "`shed` or `block_transfer_to`" ,
195195 DefaultLeaseIOOverloadThreshold ,
196196)
197197
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
201201// LeaseIOOverloadThresholdEnforcement is set to 'shed'.
202202var LeaseIOOverloadShedThreshold = settings .RegisterFloatSetting (
203203 settings .SystemOnly ,
204204 "kv.allocator.lease_shed_io_overload_threshold" ,
205205 "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 " +
207207 "`kv.allocator.lease_io_overload_threshold_enforcement` is `shed`" ,
208208 DefaultLeaseIOOverloadShedThreshold ,
209209)
@@ -236,12 +236,16 @@ var LeaseIOOverloadThresholdEnforcement = settings.RegisterEnumSetting(
236236// {ReplicaIOOverloadThreshold, ReplicaIOOverloadThresholdEnforcement}, when
237237// transferring replicas.
238238//
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.
240244var DiskUnhealthyIOOverloadScore = settings .RegisterFloatSetting (
241245 settings .SystemOnly ,
242246 "kv.allocator.disk_unhealthy_io_overload_score" ,
243247 "the IO overload score to assign to a store when its disk is unhealthy" ,
244- 0 )
248+ DefaultLeaseIOOverloadShedThreshold )
245249
246250// maxDiskUtilizationThreshold controls the point at which the store cedes
247251// having room for new replicas. If the fraction used of a store descriptor
0 commit comments