Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Shuning Chen <[email protected]>
  • Loading branch information
Shuning Chen authored and Shuning Chen committed Dec 11, 2023
1 parent 28b2136 commit 2069df0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions client/resource_group/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1218,8 +1218,6 @@ func (gc *groupCostController) onRequestWait(
}
if d, err = WaitReservations(ctx, now, res); err == nil {
break retryLoop
} else if d.Seconds() > 0 {
gc.failedLimitReserveDuration.Observe(d.Seconds())
}
case rmpb.GroupMode_RUMode:
res := make([]*Reservation, 0, len(requestUnitLimitTypeList))
Expand All @@ -1230,8 +1228,6 @@ func (gc *groupCostController) onRequestWait(
}
if d, err = WaitReservations(ctx, now, res); err == nil {
break retryLoop
} else if d.Seconds() > 0 {
gc.failedLimitReserveDuration.Observe(d.Seconds())
}
}
gc.requestRetryCounter.Inc()
Expand All @@ -1240,6 +1236,9 @@ func (gc *groupCostController) onRequestWait(
}
if err != nil {
gc.failedRequestCounter.Inc()
if d.Seconds() > 0 {
gc.failedLimitReserveDuration.Observe(d.Seconds())
}
gc.mu.Lock()
sub(gc.mu.consumption, delta)
gc.mu.Unlock()
Expand Down

0 comments on commit 2069df0

Please sign in to comment.