mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Merge pull request #34939 from wojtek-t/throttle_retried_requests
Automatic merge from submit-queue Throttle retried requests in client Fix #34938
This commit is contained in:
commit
b77e13444f
@ -795,6 +795,12 @@ func (r *Request) request(fn func(*http.Request, *http.Response)) error {
|
||||
req.Header = r.headers
|
||||
|
||||
r.backoffMgr.Sleep(r.backoffMgr.CalculateBackoff(r.URL()))
|
||||
if retries > 0 {
|
||||
// We are retrying the request that we already send to apiserver
|
||||
// at least once before.
|
||||
// This request should also be throttled with the client-internal throttler.
|
||||
r.tryThrottle()
|
||||
}
|
||||
resp, err := client.Do(req)
|
||||
updateURLMetrics(r, resp, err)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user