mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-04 11:54:24 +00:00
fb1d055b06
addClientTraffic's second pass wrote expiry_time for every polled row via UPDATE ... WHERE expiry_time < 0 — a no-op statement per active client on every 5s poll, since almost all rows carry a positive expiry. At 10k active clients that was 10k pointless indexed UPDATEs per poll. adjustTraffics now returns the emails it actually converted this tick and the persistence pass writes exactly those, in sorted order to keep concurrent writers lock-compatible on Postgres. Behavior is unchanged: unconverted rows never matched the WHERE clause anyway.