mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-11-17 10:15:09 +00:00
Compare commits
1
Commits
5f9c574f95
...
v1.0.22
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f821b8829b |
@@ -498,7 +498,7 @@ func (t *refreshAttemptTracker) mutateState(mutate func(cur *attemptState) *atte
|
|||||||
if next == nil {
|
if next == nil {
|
||||||
return cur
|
return cur
|
||||||
}
|
}
|
||||||
if t.state.CompareAndSwap(t.state.Load(), next) {
|
if t.state.CompareAndSwap(cur, next) {
|
||||||
return next
|
return next
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-2
@@ -396,8 +396,16 @@ func (c *UniversalCache) getLocal(key string) (interface{}, bool) {
|
|||||||
return value, true
|
return value, true
|
||||||
}
|
}
|
||||||
c.mu.RUnlock()
|
c.mu.RUnlock()
|
||||||
// Expired — fall through to the write-locked slow path below to
|
// Expired — return miss immediately. The periodic cleanup goroutine
|
||||||
// remove the entry under exclusive access.
|
// will evict the stale entry. NEVER fall through to the write-locked
|
||||||
|
// slow path for Token/JWK/Session caches: under Yaegi the write Lock
|
||||||
|
// at line 403 costs 10-100ms per acquisition, and Go's RWMutex
|
||||||
|
// writer-priority semantics block ALL new RLock callers while a Lock
|
||||||
|
// is pending. A single expired-token event turns every concurrent
|
||||||
|
// request from read-parallel into write-serialized — the exact
|
||||||
|
// convoy that produced the 737-goroutine pileup at 0x400275a608.
|
||||||
|
atomic.AddInt64(&c.misses, 1)
|
||||||
|
return nil, false
|
||||||
}
|
}
|
||||||
|
|
||||||
c.mu.Lock()
|
c.mu.Lock()
|
||||||
|
|||||||
Reference in New Issue
Block a user