#780 CRITICAL: cleanup_expired_rate_leases row-by-row loop has race condition

closed critical Created 2026-01-02 03:32 · Updated 2026-01-02 06:26

Description

Edit
Function deletes leases and refills tokens row-by-row without atomic locking. Concurrent consume_rate_token calls can cause tokens to exceed max_tokens. Location: migrations/01KDZ91HQGF3KDVG3EZWDWKRG1. Fix: Use set-based CTE approach instead of loop.

Comments

Loading comments...

Context

Loading context...

Audit History

View All
Loading audit history...