Skip to content

Commit

Permalink
ignore store limit check
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <rleungx@gmail.com>
  • Loading branch information
rleungx committed Oct 10, 2022
1 parent 70d9f0d commit 917b351
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/schedule/operator_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,10 @@ func (oc *OperatorController) ExceedStoreLimit(ops ...*operator.Operator) bool {

// exceedStoreLimitLocked returns true if the store exceeds the cost limit after adding the operator. Otherwise, returns false.
func (oc *OperatorController) exceedStoreLimitLocked(ops ...*operator.Operator) bool {
// The operator with Urgent priority, like admin operators, should ignore the store limit check.
if len(ops) != 0 && ops[0].GetPriorityLevel() == core.Urgent {
return false
}
opInfluence := NewTotalOpInfluence(ops, oc.cluster)
for storeID := range opInfluence.StoresInfluence {
for _, v := range storelimit.TypeNameValue {
Expand Down

0 comments on commit 917b351

Please sign in to comment.