fix(discov): add retry cooldown to prevent CPU/disk exhaustion on auth errors (#5347)

This commit is contained in:
Kevin Wan
2025-12-20 22:04:38 +08:00
committed by GitHub
parent 5c9ea81db2
commit 39729f3756
2 changed files with 7 additions and 7 deletions

View File

@@ -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))
}
}