fix(cache): harden cache backends, resilience, recovery, and transports

- RESP -ERR no longer closes healthy conn / aborts batch; global cap replacement-aware
- global health-check pass serialized (latent data race); MemoryMonitor via ResourceManager
- token-exchange retry, open-circuit rejections counted as failures
- TLS-posture matching transport reuse (no silent InsecureSkipVerify handoff)
This commit is contained in:
2026-08-14 16:16:51 +01:00
parent 8640451877
commit 4d23d618f5
49 changed files with 2318 additions and 181 deletions
+8
View File
@@ -63,6 +63,14 @@ func (m *GoroutineManager) StartGoroutine(name string, fn func(context.Context))
m.wg.Done()
m.mu.Lock()
managedGoroutine.running = false
// Prune the map entry once this goroutine has finished so that
// finished goroutines don't accumulate unboundedly (R157). Only
// delete when the current entry still IS the finishing
// goroutine: a concurrent Start with the same name may have
// already replaced it with a live one.
if cur, ok := m.goroutines[goroutineName]; ok && cur == managedGoroutine {
delete(m.goroutines, goroutineName)
}
m.mu.Unlock()
// Recover from panics