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:
2025-09-25 12:52:53 +01:00
committed by GitHub
parent 1b49e133da
commit 1e4142a7fb
9 changed files with 2001 additions and 1 deletions
+17
View File
@@ -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()
}