mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-10 08:29:58 +08:00
fix(discov): add retry cooldown to prevent CPU/disk exhaustion on auth errors (#5347)
This commit is contained in:
@@ -386,8 +386,9 @@ func (c *cluster) watch(cli EtcdClient, key watchKey, rev int64) {
|
||||
rev = c.load(cli, key)
|
||||
}
|
||||
|
||||
// log the error and retry
|
||||
// log the error and retry with cooldown to prevent CPU/disk exhaustion
|
||||
logc.Error(cli.Ctx(), err)
|
||||
time.Sleep(coolDownUnstable.AroundDuration(coolDownInterval))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user