New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refresh discovery server resources for memCacheClient in parallel #88382
Refresh discovery server resources for memCacheClient in parallel #88382
Conversation
staging/src/k8s.io/client-go/discovery/cached/memory/memcache.go
Outdated
Show resolved
Hide resolved
Thanks |
e2e test are failing, requests are getting throttled:
|
Need to prevent client side rate limiter induced timeouts. Trying to limit concurrency to 5 to see if that helps. |
412c453
to
4d09f47
Compare
I misunderstood the error, it looks like there is a correctness problem. Fixing. |
4d09f47
to
8beb555
Compare
/test pull-kubernetes-e2e-gce two passes in a row, going to try a few more |
/test pull-kubernetes-e2e-gce |
3 similar comments
/test pull-kubernetes-e2e-gce |
/test pull-kubernetes-e2e-gce |
/test pull-kubernetes-e2e-gce |
/lgtm |
staging/src/k8s.io/client-go/discovery/cached/memory/memcache.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/client-go/discovery/cached/memory/memcache_test.go
Outdated
Show resolved
Hide resolved
/approve two nits, then lgtm |
/hold for nits |
8beb555
to
a2e5a14
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jpbetz, liggitt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
e6968cf
to
cc4a2af
Compare
/hold cancel |
/lgtm |
@@ -190,16 +190,29 @@ func (d *memCacheClient) refreshLocked() error { | |||
return err | |||
} | |||
|
|||
wg := &sync.WaitGroup{} | |||
resultLock := &sync.Mutex{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var resultLock sync.Mutex
works fine here, I think? No need to change it, we'll just wait for an "ineffassign" fix...
/lgtm (I want credit for reading it ;) ) |
cc4a2af
to
190a723
Compare
/lgtm |
What type of PR is this?
/kind flake
What this PR does / why we need it:
Run discovery API calls in parallel to reduce for in-memory discovery client. Reduces each cache refresh from ~15 seconds to ~ 2 seconds.
This helps e2e tests since they are run in parallel and some remove CRDs at the same others are being run, forcing the cache to be refreshed often.
In e2e tests we're seeing a groupVersion list length of around 27, which means we are 27 API calls in series.
See #87668 and #88297 for debugging details.
There might be other ways to optimize this further, but running the requests in parallel is an obvious win, so would like to merge this before pursuing other optimizations.
Last 9
pull-kubernetes-e2e-gce
runs below. No GC failures. This is with SSA at 10%1230671712341725185 - pass - 53m18s
1230729716571312129 - pass - 49m35s
1230742932269568000 - pass - 47m0s
1230756271573962752 - pass - 45m38s
1230767966954459136 - pass - 51m17s
1230781434029936640 - 12 In-tree Volumes failures - 48m41s
1230885123486912512 - 1 volume mount failure - 50m28s
1230899588768993280 - 1 volume mount failure - 51m12s
1230916073155465216 - pass - 49m40s
From #88297 here are the last 9 runs with SSA at 100%. No GC failures.
1230746203231096836 - pass - 1h1m41s
1230762058010595328 - 1 volume/CSIDriver failure - 1h0m17s
1230778298858999808 - 15 In-tree Volumes failures - 50m16s
1230885241724342272 - pass - 51m50s
1230899588773187585 - pass - 52m36s
1230919719050022912 - pass - 57m56s
1230949943569551360 - 1 In-tree Volumes failures, 2 PersistentVolumes-local failures - 59m57s
1230966546394779648 - 1 CRD publish OpenAPI failure, 58m36s
1230985169494609921 - pass - 55m29s
Which issue(s) this PR fixes:
Fixes #87668
Special notes for your reviewer:
Does this PR introduce a user-facing change?: