An unlimited per-check limit stops downloads on Postgres #98
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
With max_new_per_check set to 0 (unlimited) and no per-subscription limit, merge_policy's budget is usize::MAX, and Db::pending binds it as
limit as i64, which is -1. SQLite reads LIMIT -1 as no limit; Postgres refuses it (LIMIT must not be negative), so the scan of that feed fails when it gets to its downloads. Production's limit is 3, so it is not hit today. Found reading pending() while looking at #97. Fix: clamp,limit.min(i64::MAX as usize) as i64.Fixed in
4a26c73: pending() clamps the limit to i64::MAX before binding it. The new test fails on Postgres without it (LIMIT must not be negative) and passes with it; the whole suite passes on SQLite and Postgres. Deployed.