disableInvalidClients evaluated the depleted predicate twice per poll: once to SELECT the rows (for xray removal and settings sync) and again in the UPDATE that flips enable off — each a full client_traffics scan, the second also re-running the cross-panel EXISTS subquery when global rows exist. The UPDATE now flips the already-collected rows by primary key in sqlInChunk batches, sorted for stable lock order. Same rows, same RowsAffected, half the scan cost; id-based matching also stays correct for rows with empty emails.
97588dd0b9
·
2026-07-02 16:24:18 +02:00
History