User Request
Type: bug
Target: Console Application
Submitted by: @aashu2006
Console Request ID: c71399eb-f794-4608-aa43-f4c582556a32
Description
What happened:
In pkg/api/handlers/gitops.go:710-759, the cache check releases RLock at line 725 before the fetch at line 727. Two concurrent requests for the same cluster both see a cache miss, both call fetchOperatorsFromCluster, and both write the result. There is no singleflight or write-lock-then-recheck guard. With 18+ clusters queried in parallel this race fires regularly.
What I expected:
singleflight should coalesce concurrent cold-cache fetches, or the write lock should include a second cache check before writing.
Steps to reproduce:
- Send multiple concurrent requests for the same cluster
- Observe multiple Kubernetes API calls for the same cluster's operators
This issue was automatically created from the KubeStellar Console.
User Request
Type: bug
Target: Console Application
Submitted by: @aashu2006
Console Request ID: c71399eb-f794-4608-aa43-f4c582556a32
Description
What happened:
In
pkg/api/handlers/gitops.go:710-759, the cache check releasesRLockat line 725 before the fetch at line 727. Two concurrent requests for the same cluster both see a cache miss, both callfetchOperatorsFromCluster, and both write the result. There is nosingleflightor write-lock-then-recheck guard. With 18+ clusters queried in parallel this race fires regularly.What I expected:
singleflightshould coalesce concurrent cold-cache fetches, or the write lock should include a second cache check before writing.Steps to reproduce:
This issue was automatically created from the KubeStellar Console.