Skip to content

Commit

Permalink
Update pkg/mcs/resourcemanager/server/token_buckets.go
Browse files Browse the repository at this point in the history
Co-authored-by: Hu# <[email protected]>
  • Loading branch information
guo-shaoge and HuSharp authored Nov 10, 2023
1 parent 6f57668 commit 6122ee9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/mcs/resourcemanager/server/token_buckets.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,9 @@ func (gts *GroupTokenBucketState) balanceSlotTokens(
// Only slots that require a positive number will be considered alive,
// but still need to allocate the elapsed tokens as well.
if requiredToken != 0 {
slot = &TokenSlot{}
slot = &TokenSlot{lastReqTime: now}
gts.tokenSlots[clientUniqueID] = slot
gts.clientConsumptionTokensSum = 0
slot.lastReqTime = now
}
} else {
slot.lastReqTime = now
Expand Down

0 comments on commit 6122ee9

Please sign in to comment.