Cut pool merge stalls, and fix two relay bugs #46

Merged
namillis merged 1 commit from fix/merge-stalls into main 2026-11-20 15:19:29 +00:00
Owner

Each provider refresh re-merged every channel and blocked requests for 5 to 10 s with 15 providers (about 15 times an hour). Profiling the real pool: a merge with nothing changed took 5.4 s, 3.4 s of it in guideOwners for one guide id premplus puts on 4,107 channels (it compared every pair of names). It now groups channels through shared words with union-find: identical results on the real pool (3,307 misfiled, 0 differences), 368 ms instead of 3,745. Refreshes close together share one merge (at most one a minute), and each merge logs its time.

Relay fixes: a refusal while the provider's account is full no longer counts toward redirect-only (sonymax's one connection is used by someone else, so its 401s were read as an IP block); the relay log names the providers it skipped instead of "no candidates"; and the dashboard counts relay connections as the pool's own. 141 tests pass.

Each provider refresh re-merged every channel and blocked requests for 5 to 10 s with 15 providers (about 15 times an hour). Profiling the real pool: a merge with nothing changed took 5.4 s, 3.4 s of it in `guideOwners` for one guide id premplus puts on 4,107 channels (it compared every pair of names). It now groups channels through shared words with union-find: identical results on the real pool (3,307 misfiled, 0 differences), 368 ms instead of 3,745. Refreshes close together share one merge (at most one a minute), and each merge logs its time. Relay fixes: a refusal while the provider's account is full no longer counts toward redirect-only (sonymax's one connection is used by someone else, so its 401s were read as an IP block); the relay log names the providers it skipped instead of "no candidates"; and the dashboard counts relay connections as the pool's own. 141 tests pass.
Cut pool merge stalls, and fix two relay bugs
All checks were successful
CI / test (pull_request) Successful in 20s
1c47ca876e
Each provider refresh re-merged every channel, blocking requests for 5 to 10 s with 15 providers. Most of it was
sorting out one guide id that premplus puts on 4,107 channels, which compared every pair of names. It now joins
channels through shared words in one pass: the same 3,307 decisions on the real pool, in 368 ms instead of 3,745.
Refreshes close together now share one merge, at most one a minute, and each merge logs its time.

A refusal from a full account no longer makes the relay treat the provider as blocking the server, the relay log
names providers it skipped for that reason instead of saying there were no candidates, and the dashboard counts
the relay's connections as the pool's own, so they no longer show as outside use.
namillis deleted branch fix/merge-stalls 2026-11-20 15:19:29 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
namillis/iptv-pool!46
No description provided.