Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
b77e1344
Commit
b77e1344
authored
Oct 18, 2016
by
Kubernetes Submit Queue
Committed by
GitHub
Oct 18, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #34939 from wojtek-t/throttle_retried_requests
Automatic merge from submit-queue Throttle retried requests in client Fix #34938
parents
6ea0d05a
564fc0cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
request.go
pkg/client/restclient/request.go
+6
-0
No files found.
pkg/client/restclient/request.go
View file @
b77e1344
...
@@ -795,6 +795,12 @@ func (r *Request) request(fn func(*http.Request, *http.Response)) error {
...
@@ -795,6 +795,12 @@ func (r *Request) request(fn func(*http.Request, *http.Response)) error {
req
.
Header
=
r
.
headers
req
.
Header
=
r
.
headers
r
.
backoffMgr
.
Sleep
(
r
.
backoffMgr
.
CalculateBackoff
(
r
.
URL
()))
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
)
resp
,
err
:=
client
.
Do
(
req
)
updateURLMetrics
(
r
,
resp
,
err
)
updateURLMetrics
(
r
,
resp
,
err
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment