Skip to content

Commit

Permalink
remove ru token and set brust limit
Browse files Browse the repository at this point in the history
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
  • Loading branch information
CabinfeverB committed Feb 8, 2023
1 parent bdde733 commit b191487
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/mcs/resource_manager/server/token_bukets.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ func (t *GroupTokenBucket) request(now time.Time, neededTokens float64, targetPe
t.Tokens += float64(t.Settings.FillRate) * delta.Seconds()
t.LastUpdate = &now
}
if t.Settings.BurstLimit != 0 {
if burst := float64(t.Settings.BurstLimit); t.Tokens > burst {
t.Tokens = burst
}
}
if t.Settings.BurstLimit != 0 {
if burst := float64(t.Settings.BurstLimit); t.Tokens > burst {
t.Tokens = burst
}
}

Expand Down

0 comments on commit b191487

Please sign in to comment.