about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2018-04-24 19:43:25 +0000
committerEric Wong <e@80x24.org>2018-04-24 19:43:34 +0000
commit77704e711685d119fde9d1737029e102c76c9a14 (patch)
treed36cca21ff6ee42cd3575a8d02868994ce3c8e4b
parentf826a7830bce67c0f8c653baf97f7769bb2c57d9 (diff)
downloadpublic-inbox-77704e711685d119fde9d1737029e102c76c9a14.tar.gz
All callers in expect to iterate through results.  This
was causing unfairness when fetching large ranges via XHDR
as rtin does :<

Fixes: b8c41362f2a5c8fc "nntp: simplify the long_response API"
-rw-r--r--lib/PublicInbox/Msgmap.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Msgmap.pm b/lib/PublicInbox/Msgmap.pm
index 192e311a..fdc71e46 100644
--- a/lib/PublicInbox/Msgmap.pm
+++ b/lib/PublicInbox/Msgmap.pm
@@ -199,7 +199,7 @@ sub msg_range {
         my $attr = { Columns => [] };
         my $mids = $dbh->selectall_arrayref(<<'', $attr, $$beg, $end);
 SELECT num,mid FROM msgmap WHERE num >= ? AND num <= ?
-ORDER BY num ASC
+ORDER BY num ASC LIMIT 1000
 
         $$beg = $mids->[-1]->[0] + 1 if @$mids;
         $mids