• erio's avatar
    feat: cleanup stale concurrency slots on startup · a88698f3
    erio authored
    
    
    When the service restarts, concurrency slots from the old process
    remain in Redis, causing phantom occupancy. On startup, scan all
    concurrency sorted sets and remove members with non-current process
    prefix, then clear orphaned wait queue counters.
    
    Uses Go-side SCAN to discover keys (compatible with Redis client
    prefix hooks in tests), then passes them to a Lua script for
    atomic member-level cleanup.
    Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
    a88698f3
concurrency_cache.go 17.1 KB