perf(shared-state): scope decision breaker to decision providers

The decision breaker covered every provider id but a decider only queries its own router provider.
The breaker now covers the sorted, de-duplicated decision providers.
This cuts the refresh key count and the Redis read per tick.
This commit is contained in:
2026-11-26 07:41:30 +00:00
parent beaefa3cf6
commit 6d1bc2cd33
3 changed files with 47 additions and 9 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ func BenchRefreshSetup(redisAddr string, n int) int {
newSharedBreaker(l, sharedKindRequest, ids, 5, time.Second, time.Minute, 2*time.Minute)
newSharedInflight(l, ids, 15*time.Minute)
newSharedBreaker(l, sharedKindDiscovery, ids, 5, time.Second, time.Minute, 2*time.Minute)
newSharedBreaker(l, sharedKindDecision, ids, 5, time.Second, time.Minute, 2*time.Minute)
newSharedBreaker(l, sharedKindDecision, ids[:3], 5, time.Second, time.Minute, 2*time.Minute)
benchLoop = l
benchStore = store
benchBig = make([]string, usageModelsChunkKeys)