throttling just prior to leaving hibernation, so as to allow re-throttle checks to apply
This commit is contained in:
parent
3955a6d67f
commit
ad47f7c147
@ -42,6 +42,7 @@ type ThrottleReasonHint string
|
||||
const (
|
||||
NoThrottleReasonHint ThrottleReasonHint = "NoThrottleReasonHint"
|
||||
UserCommandThrottleReasonHint = "UserCommandThrottleReasonHint"
|
||||
LeavingHibernationThrottleReasonHint = "LeavingHibernationThrottleReasonHint"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -289,6 +289,7 @@ func (this *Throttler) collectGeneralThrottleMetrics() error {
|
||||
log.Errorf("critical-load met. Will hibernate for the duration of %+v, until %+v", hibernateDuration, hibernateUntilTime)
|
||||
go func() {
|
||||
time.Sleep(hibernateDuration)
|
||||
this.migrationContext.SetThrottleGeneralCheckResult(base.NewThrottleCheckResult(true, "leaving hibernation", base.LeavingHibernationThrottleReasonHint))
|
||||
atomic.StoreInt64(&this.migrationContext.HibernateUntil, 0)
|
||||
}()
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user