User Request
Type: bug
Target: Console Application
Submitted by: @aashu2006
Console Request ID: 70ef397d-4904-4593-8488-5769dc92e9b2
Description
What happened:
In pkg/api/handlers/nightly_e2e.go:223-257, after RUnlock() at line 234, all concurrent GetRuns callers miss the cache and independently call h.fetchAll(). The write lock at line 251 does not re-check whether another goroutine already populated the cache — it unconditionally overwrites it. Each fetchAll() call spawns 17+ goroutines.
What I expected:
A re-check under the write lock should prevent redundant cache writes. singleflight should coalesce concurrent cold-cache fetches into one.
Steps to reproduce:
- Let the cache expire
- Send 10 concurrent GetRuns requests
- Observe 10 × 17+ goroutines spawned for concurrent fetches
This issue was automatically created from the KubeStellar Console.
User Request
Type: bug
Target: Console Application
Submitted by: @aashu2006
Console Request ID: 70ef397d-4904-4593-8488-5769dc92e9b2
Description
What happened:
In
pkg/api/handlers/nightly_e2e.go:223-257, afterRUnlock()at line 234, all concurrentGetRunscallers miss the cache and independently callh.fetchAll(). The write lock at line 251 does not re-check whether another goroutine already populated the cache — it unconditionally overwrites it. EachfetchAll()call spawns 17+ goroutines.What I expected:
A re-check under the write lock should prevent redundant cache writes.
singleflightshould coalesce concurrent cold-cache fetches into one.Steps to reproduce:
This issue was automatically created from the KubeStellar Console.