Files
mirror-3x-ui/internal
Hamed 8fb6418c77 perf(iplimit): stop scanning after the first limited client (#7200)
The IP-limit job asks every 10 seconds whether any client carries an IP limit. The probe was a COUNT with LIMIT 1, and the limit applies to the one-row aggregate, so the database still read the whole clients table on every run.

Ask with SELECT EXISTS instead, so the scan stops at the first client with limit_ip > 0. The predicate and the fail-to-false behaviour are unchanged; the probe test now also runs in the PostgreSQL scanner suite.

Closes #7199
2026-11-25 12:51:47 +03:30
..
2026-10-25 20:08:14 +01:00