Repository navigation
Torznab: fair admission for queued searches and paced metadata grabs #2733
Replies: 1 comment
Agent BriefCategory: enhancement Current behavior: Desired behavior: Key interfaces:
Acceptance criteria:
Out of scope:
Why a human: Feature scope is a maintainer call. A fairness bound and a per-indexer interval setting change how hard qui hits trackers and add user-facing configuration, and the report comes from a modified build rather than a stock-build starvation trace. |
Uh oh!
There was an error while loading. Please reload this page.
Description
Request an optional fairness policy for long-running background searches sharing a native indexer with other searches and torrent-file grabs. Keep interactive work responsive, but allow older background work to make progress whenever the tracker is eligible for requests.
Current source uses priority/FIFO ordering for queued searches, while metadata grabs call
WaitForMinIntervaldirectly. The two admission paths share timing state but do not share a queue. Strict search priority can delay background work under sustained higher-priority arrivals; queue aging alone cannot account for metadata grabs outside the scheduler.This is a scheduling enhancement, not a request to ignore tracker cooldowns or guarantee a deadline during an outage.
Scenario and proposal
A common admission mechanism for queries and grabs could preserve source priorities while providing bounded fairness/aging when requests are allowed. Tracker cooldowns must remain authoritative. Per-indexer minimum intervals would also let the shared budget reflect each native endpoint's documented policy, with conservative defaults; they should cover all request attempts and retries rather than multiplying traffic independently in each workflow.
Evidence and limits
Source: priority ordering, direct grab admission.
On our modified production build, a background query was queued at approximately 18:00:47 while metadata grabs completed at 18:01:03, :18, :33, :48 and 18:02:03. That build already has a local queue-aging extension and different native pacing intervals. The trace motivates this request but is not a stock-build starvation reproduction. The upstream separation between scheduled searches and direct grab pacing was checked in current source.
Related PR641 established the asynchronous priority scheduler. Discussion1667 concerns a wait timeout; 1868 concerns library scan limits/cadence. Neither requests fairness across direct grabs and queued searches. Shared-slot reservation/retry correctness is being reported separately from this policy request.
Environment
The production build has local cross-seed extensions. Current upstream was inspected separately; only the explicitly described isolated tests were run against that upstream revision. No production tracker was used by the reproductions.
Checklist
All reactions