mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-12 04:04:26 +00:00
release 0.7.2 (#66)
* Remove trailing / from metadata provider. * Resolves issue #67 - Before: 100 concurrent requests → 300+ refresh attempts → OOM - After: 100 concurrent requests → 1 refresh attempt → Stable memory Added following changes: - Introduced a refresh coordinator to manage concurrent refresh requests - Implemented a test to simulate high concurrency and verify memory stability * Issue #67 fixed.
This commit is contained in:
@@ -11,6 +11,8 @@ import (
|
||||
"sync/atomic"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/lukaszraczylo/traefikoidc/session/chunking"
|
||||
)
|
||||
|
||||
// GlobalTestCleanup tracks and cleans up test resources
|
||||
@@ -113,6 +115,15 @@ func (g *GlobalTestCleanup) CleanupAll() {
|
||||
// Reset all global singletons to prevent state pollution between tests
|
||||
ResetGlobalMemoryMonitor()
|
||||
ResetGlobalTaskRegistry()
|
||||
ResetGlobalMemoryOptimizations()
|
||||
ResetSingletonNoOpLogger()
|
||||
|
||||
// Reset global session counters to prevent overflow in memory calculations
|
||||
ResetGlobalSessionCounters()
|
||||
|
||||
// Reset global session counters in chunking package as well
|
||||
// Note: This calls the function in session/chunking package
|
||||
resetChunkingGlobalSessionCounters()
|
||||
|
||||
// Give background tasks time to finish cleanup
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
@@ -949,3 +960,9 @@ func (h *PerformanceTestHelper) Reset() {
|
||||
defer h.mu.Unlock()
|
||||
h.samples = h.samples[:0]
|
||||
}
|
||||
|
||||
// resetChunkingGlobalSessionCounters resets the global session counters
|
||||
// in the chunking package to prevent test interference
|
||||
func resetChunkingGlobalSessionCounters() {
|
||||
chunking.ResetGlobalSessionCounters()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user